custom

package
v0.0.0-...-aa61724 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 4

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)

Jump to

Keyboard shortcuts

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