cryptoutil

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 8 Imported by: 4

Documentation

Overview

Package cryptoutil contains crypto-related helpers and utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePEMCertificate

func DecodePEMCertificate(pemData []byte) (*x509.Certificate, error)

DecodePEMCertificate returns an X509 certificate from a PEM-encoded certificate provided in pemData.

func PEMCertificate

func PEMCertificate(derBytes []byte) []byte

PEMCertificate returns derBytes encoded as a PEM block

func TopicFromCert

func TopicFromCert(cert *x509.Certificate) (string, error)

TopicFromCert extracts the APNs Topic (UserID OID) from cert.

func TopicFromPEMCert

func TopicFromPEMCert(pemCert []byte) (string, error)

TopicFromPEMCert extracts the APNs Topic from a PEM-encoded cert.

func VerifyMdmSignature

func VerifyMdmSignature(header string, body []byte) (*x509.Certificate, error)

VerifyMdmSignature verifies an Apple MDM "Mdm-Signature" header and returns the signing certificate.

See https://developer.apple.com/documentation/devicemanagement/implementing_device_management/managing_certificates_for_mdm_servers_and_devices section "Pass an Identity Certificate Through a Proxy."

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL