Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSkipError ¶
IsSkipError returns true if the error means the cert should be skipped over rather than being a fatal error
func ParseCertificate ¶
func ParseCertificate(der []byte) (*x509.Certificate, error)
ParseCertificate parses a single certificate from the given ASN.1 DER data This is a wrapper for the x509.ParseCertificate function, handling the special case of a cert in a public trust bundle with a negative serial number which produces an error by default in Go 1.23. If using Go 1.22 or older, or if using Go 1.23 or newer and the GODEBUG value `x509negativeserial` is set to `1`, that specific cert will parse with no error. Otherwise, a special Error value will be returned so that the certificate can be skipped using IsSkipError
Types ¶
Click to show internal directories.
Click to hide internal directories.