Documentation ¶
Index ¶
- func GenerateRandomCertificateSerialNumber() (*big.Int, error)
- func ReadEncryptedPEMRSAKeyFile(path string, password []byte) (*rsa.PrivateKey, error)
- func ReadPEMCertificateFile(path string) (*x509.Certificate, error)
- func ReadPEMCertificatesFile(path string) ([]*x509.Certificate, error)
- func ReadPEMRSAKeyFile(path string) (*rsa.PrivateKey, error)
- func SimpleSelfSignedRSAKeypair(cn string, days int) (key *rsa.PrivateKey, cert *x509.Certificate, err error)
- func TopicFromCert(cert *x509.Certificate) (string, error)
- func VerifyFromAppleDeviceCA(c *x509.Certificate) error
- func WriteEncryptedPEMRSAKeyFile(key *rsa.PrivateKey, password []byte, path string) error
- func WritePEMCertificateFile(cert *x509.Certificate, path string) error
- func WritePEMRSAKeyFile(key *rsa.PrivateKey, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadEncryptedPEMRSAKeyFile ¶
func ReadEncryptedPEMRSAKeyFile(path string, password []byte) (*rsa.PrivateKey, error)
func ReadPEMCertificateFile ¶
func ReadPEMCertificateFile(path string) (*x509.Certificate, error)
func ReadPEMCertificatesFile ¶
func ReadPEMCertificatesFile(path string) ([]*x509.Certificate, error)
func ReadPEMRSAKeyFile ¶
func ReadPEMRSAKeyFile(path string) (*rsa.PrivateKey, 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 WriteEncryptedPEMRSAKeyFile ¶
func WriteEncryptedPEMRSAKeyFile(key *rsa.PrivateKey, password []byte, path string) error
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. |
Click to show internal directories.
Click to hide internal directories.