Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertificate ¶
func CreateCertificate(template, parent *x509.Certificate, pub, priv any) ([]byte, error)
CreateCertificate creates a certificate from an x509 template endorsing the provided pub key, with a signature generated using priv key. The provided parent certificate must endorse the public version of priv key.
The priv key must implement the crypto.Signer interface.
Types ¶
type Params ¶
type Params struct { Version int SerialNumber []byte Issuer, Subject, BasicConstraints pkix.Name NotBefore, NotAfter time.Time KeyUsage x509.KeyUsage ExtKeyUsage []asn1.ObjectIdentifier BasicConstraintsValid bool IsCA bool SignatureAlgorithm x509.SignatureAlgorithm Extension []pkix.Extension AuthorityKeyId pkix.Extension SubjectAltName pkix.Extension IssuingCertificateURL []string }
Params contains parameters used to populate the certificate template at build time.
Click to show internal directories.
Click to hide internal directories.