Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSigned = errors.New("package not signed")
Functions ¶
func GeneratePkg ¶
GeneratePkg creates a Distribution style, payload free pkg with identifier, version, and postinstall. See http://bomutils.dyndns.org/tutorial.html
func SignPkg ¶
func SignPkg(pkg []byte, cert *x509.Certificate, key *rsa.PrivateKey) ([]byte, error)
SignPkg signs and returns the given pkg with the given certificate and key. The certificate should be an "Apple Developer ID Installer" certificate. See https://mackyle.github.io/xar/howtosign.html
Types ¶
type Asset ¶ added in v1.2.0
type Asset struct { Kind string `plist:"kind" json:"kind"` MD5Size int `plist:"md5-size,omitempty" json:"md5-size,omitempty"` MD5s []string `plist:"md5s,omitempty" json:"md5s,omitempty"` SHA256Size int `plist:"sha256-size,omitempty" json:"sha256-size,omitempty"` SHA256s []string `plist:"sha256s,omitempty" json:"sha256s,omitempty"` URL string `plist:"url" json:"url"` }
type Manifest ¶ added in v1.2.0
type Manifest struct {
Items []*Item `plist:"items" json:"items"`
}
Manifest is used by a MDM's InstallApplication or InstallEnterpiseApplication's command
func NewManifest ¶ added in v1.2.0
func NewManifest(pkg []byte, url string, h ManifestHash) *Manifest
NewManifest generates a Manifest by hashing the given package (which should be signed) and setting the URL. h should be ManifestHashMD5 for InstallApplication commands and ManifestHashSHA256 for InstallEnterpiseApplication commands
type ManifestHash ¶ added in v1.2.0
type ManifestHash int
const ( ManifestHashMD5 ManifestHash = iota ManifestHashSHA256 )
Click to show internal directories.
Click to hide internal directories.