Documentation
¶
Overview ¶
Package mudcerts provides a set of functions to generate certificates, keys, and signatures relating to MUD files and MUD-enabled devices.
Package mudcerts provides a set of functions to generate certificates, keys, and signatures relating to MUD files and MUD-enabled devices.
Package mudcerts provides a set of functions to generate certificates, keys, and signatures relating to MUD files and MUD-enabled devices.
Package mudcerts provides a set of functions to generate certificates, keys, and signatures relating to MUD files and MUD-enabled devices.
Package mudcerts provides a set of functions to generate certificates, keys, and signatures relating to MUD files and MUD-enabled devices.
Package mudcerts provides a set of functions to generate certificates, keys, and signatures relating to MUD files and MUD-enabled devices.
Package mudcerts provides a set of functions to generate certificates, keys, and signatures relating to MUD files and MUD-enabled devices.
Index ¶
- func GenCA(p ProductInfo) ([]byte, *ecdsa.PrivateKey, error)
- func MakeMUDcert(p ProductInfo, ca *x509.Certificate, caPrivKey *ecdsa.PrivateKey) ([]byte, *ecdsa.PrivateKey, error)
- func MakePEM(inBytes []byte, pemtype string) *bytes.Buffer
- func MakeSignerCert(p ProductInfo, ca *x509.Certificate, caPrivKey *ecdsa.PrivateKey) ([]byte, *ecdsa.PrivateKey, error)
- func SignMudFile(mudfile string, signerCert *x509.Certificate, certkey *ecdsa.PrivateKey) ([]byte, error)
- type ProductInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenCA ¶
func GenCA(p ProductInfo) ([]byte, *ecdsa.PrivateKey, error)
GenCA takes as input some Manufacturer information, and produce a CA cert and associated key. This can be used to generate a signer cert and key.
func MakeMUDcert ¶
func MakeMUDcert(p ProductInfo, ca *x509.Certificate, caPrivKey *ecdsa.PrivateKey) ([]byte, *ecdsa.PrivateKey, error)
MakeMUDcert returns an IEEE 802.1AR certificate with MUD extensions, and associated key. You can use MakeSignerCert in front of this routine.
func MakeSignerCert ¶
func MakeSignerCert(p ProductInfo, ca *x509.Certificate, caPrivKey *ecdsa.PrivateKey) ([]byte, *ecdsa.PrivateKey, error)
MakeSignerCert returns an end entity certificate used solely for signing MUD files.
func SignMudFile ¶
func SignMudFile(mudfile string, signerCert *x509.Certificate, certkey *ecdsa.PrivateKey) ([]byte, error)
SignMudFile sign a MUD file and returns a signature.
Types ¶
type ProductInfo ¶
type ProductInfo struct {
Manufacturer, Model, CountryCode string
MudUrl, SerialNumber, Mudfile string
EmailAddress string
}
ProductInfo is used to pass parameters to various routines. note Mudfile is base64-encoded.
