crypto

package
v0.0.0-...-29c6822 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomCertificateSerialNumber

func GenerateRandomCertificateSerialNumber() (*big.Int, error)

func ReadPEMCertificateFile

func ReadPEMCertificateFile(path string) (*x509.Certificate, error)

func ReadPEMCertificatesFile

func ReadPEMCertificatesFile(path string) ([]*x509.Certificate, error)

func SimpleSelfSignedRSAKeypair

func SimpleSelfSignedRSAKeypair(cn string, days int) (key *rsa.PrivateKey, cert *x509.Certificate, err error)

func TopicFromCert

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

TopicFromCert extracts the push certificate topic from the provided certificate.

func VerifyFromAppleDeviceCA

func VerifyFromAppleDeviceCA(c *x509.Certificate) error

VerifyFromAppleDeviceCA verifies a certificate was signed by Apple's iPhone Device CA. TODO: We want to have more intensive verification (like the whole provided chain). TODO: Implement some sort of cache so we don't need to parse PEM & DER every invocation.

func WritePEMCertificateFile

func WritePEMCertificateFile(cert *x509.Certificate, path string) error

func WritePEMRSAKeyFile

func WritePEMRSAKeyFile(key *rsa.PrivateKey, path string) error

Types

This section is empty.

Directories

Path Synopsis
Package mdmcertutil contains helpers for requesting MDM Push Certifificates.
Package mdmcertutil contains helpers for requesting MDM Push Certifificates.
Package password provides utilities for creating and verifying macOS passwords for MDM account configuration.
Package password provides utilities for creating and verifying macOS passwords for MDM account configuration.

Jump to

Keyboard shortcuts

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