Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteCert ¶
func WriteCert(cert *Certificate) string
WriteCert will format a certificate object
Types ¶
type Certificate ¶
type Certificate struct { Issuer string Subject string Label string Serial string MD5Fingerprint string SHA1Fingerprint string SHA256Fingerprint string PEMBlock *pem.Block }
Certificate is an in-memory representation of a certificate.
func DecodePEMBlock ¶
func DecodePEMBlock(data []byte) ([]*Certificate, error)
DecodePEMBlock takes a single PEM file as provided by a user and decodes it into our intermediate certificate representation.
The special function of this code is to handle the case that the user has accidentally provided us with a concatenated set of certificates. In this case, all certificates will be added to the trust store, with the label manipulated slightly to distinguish between them.
Click to show internal directories.
Click to hide internal directories.