mdmcertutil

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 14 Imported by: 2

Documentation

Overview

Package mdmcertutil contains helpers for requesting MDM Push Certifificates. The process is described by Apple at https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/MobileDeviceManagementProtocolRef/7-MDMVendorCSRSigningOverview/MDMVendorCSRSigningOverview.html#//apple_ref/doc/uid/TP40017387-CH6-SW4

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCSR

func CreateCSR(req *CSRConfig) error

CreateCSR creates a new private key and CSR, saving both as PEM encoded files.

func NewCSR

func NewCSR(priv *rsa.PrivateKey, email, country, cname string) ([]byte, error)

create a CSR using the same parameters as Keychain Access would produce

func PemCSR

func PemCSR(derBytes []byte) []byte

convert DER to PEM format

Types

type CSRConfig

type CSRConfig struct {
	CommonName, Country, Email string
	PrivateKeyPassword         []byte
	PrivateKeyPath, CSRPath    string
}

CSRConfig defines arguments required to create a new CSR.

type PushCertificateRequest

type PushCertificateRequest struct {
	PushCertRequestCSR       string
	PushCertCertificateChain string
	PushCertSignature        string
}

The PushCertificateRequest structure required by identity.apple.com to create an MDM Push certificate.

func CreatePushCertificateRequest

func CreatePushCertificateRequest(mdmCertPath, pushCSRPath, pKeyPath string, pKeyPass []byte) (*PushCertificateRequest, error)

CreatePushCertificateRequest creates a request structure required by identity.apple.com. It requires a "MDM CSR" certificate (the vendor certificate), a push CSR (the customer specific CSR), and the vendor private key.

func (*PushCertificateRequest) Encode

func (p *PushCertificateRequest) Encode() ([]byte, error)

Encode marshals a PushCertificateRequest to an XML Plist file and returns a base64 encoded byte representation of the request.

Jump to

Keyboard shortcuts

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