Versions in this module Expand all Collapse all v2 v2.0.0 Aug 1, 2022 Changes in this version + func GenerateCSR(cfg Configuration, privateKey *ecdsa.PrivateKey) ([]byte, error) + func GenerateCert(cfg Configuration, privateKey *ecdsa.PrivateKey, signerCA []*x509.Certificate, ...) ([]byte, error) + func GenerateIdentityCSR(cfg Configuration, deviceID string, privateKey *ecdsa.PrivateKey) ([]byte, error) + func GenerateIdentityCert(cfg Configuration, deviceID string, privateKey *ecdsa.PrivateKey, ...) ([]byte, error) + func GenerateIntermediateCA(cfg Configuration, privateKey *ecdsa.PrivateKey, signerCA []*x509.Certificate, ...) ([]byte, error) + func GenerateRootCA(cfg Configuration, privateKey *ecdsa.PrivateKey) ([]byte, error) + func NewIdentityCSRTemplate(deviceID string) (*x509.CertificateRequest, error) + func OidFromExtKeyUsage(eku x509.ExtKeyUsage) (oid asn1.ObjectIdentifier, ok bool) + type Configuration struct + BasicConstraints struct{ ... } + ExtensionKeyUsages []string + KeyUsages []string + Subject struct{ ... } + SubjectAlternativeName struct{ ... } + ValidFor time.Duration + ValidFrom string + func (cfg Configuration) AsnExtensionKeyUsages() ([]asn1.ObjectIdentifier, error) + func (cfg Configuration) AsnKeyUsages() (asn1.BitString, error) + func (cfg Configuration) ToIPAddresses() ([]net.IP, error) + func (cfg Configuration) ToPkixName() pkix.Name + func (cfg Configuration) ToValidFrom() (time.Time, error) + func (cfg Configuration) X509ExtKeyUsages() ([]x509.ExtKeyUsage, []asn1.ObjectIdentifier, error) + func (cfg Configuration) X509KeyUsages() (x509.KeyUsage, error)