Documentation ¶
Overview ¶
Package custom implements non-normative types and functions for DI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignDeviceCertificate ¶
func SignDeviceCertificate(ca CertificateAuthority) func(*DeviceMfgInfo) ([]*x509.Certificate, error)
SignDeviceCertificate creates a device certificate chain from the info sent in DI.AppStart.
Types ¶
type CertificateAuthority ¶
type CertificateAuthority interface { // ManufacturerKey returns the signer of a given key type and its certificate // chain (required). ManufacturerKey(keyType protocol.KeyType) (crypto.Signer, []*x509.Certificate, error) }
CertificateAuthority contains the necessary method to get a CA key and chain for signing device certificates.
type DeviceMfgInfo ¶
type DeviceMfgInfo struct { KeyType protocol.KeyType KeyEncoding protocol.KeyEncoding SerialNumber string DeviceInfo string CertInfo cbor.X509CertificateRequest }
DeviceMfgInfo is an example structure for use in DI.AppStart. The structure is not part of the spec, but matches the C client and Java client implementations.
Type definition from C:
MfgInfo.cbor = [ pkType, // as per FDO spec pkEnc, // as per FDO spec serialNo, // tstr modelNo, // tstr CSR, // bstr OnDie ECDSA cert chain, // bstr OR OMITTED test signature, // bstr OR OMITTED MAROE prefix, // bstr OR OMITTED ] DeviceMfgInfo = bstr, MfgInfo.cbor (bstr-wrap MfgInfo CBOR bytes)
Click to show internal directories.
Click to hide internal directories.