# Packages
Package derhelpers implements common functionality on DER encoded data.
No description provided by the author
# Functions
CreateTLSConfig creates a tls.Config object from certs and roots.
DeserializeSCTList deserializes a list of SCTs.
EncodeCertificatePEM encodes a single x509 certificates to PEM.
EncodeCertificatesPEM encodes a number of x509 certificates to PEM.
ExpiryTime returns the time when the certificate chain is expired.
GetKeyDERFromPEM parses a PEM-encoded private key and returns DER-format key bytes.
HashAlgoString returns the hash algorithm name contains in the signature method.
InclusiveDate returns the time.Time representation of a date - 1 nanosecond.
KeyLength returns the bit size of ECDSA or RSA PublicKey.
LoadClientCertificate load key/certificate from pem files.
LoadPEMCertPool loads a pool of PEM certificates from file.
MonthsValid returns the number of months for which a certificate is valid.
ParseCertificatePEM parses and returns a PEM-encoded certificate, can handle PEM encoded PKCS #7 structures.
ParseCertificatesDER parses a DER encoding of a certificate object and possibly private key, either PKCS #7, PKCS #12, or raw x509.
ParseCertificatesPEM parses a sequence of PEM-encoded certificate and returns them, can handle PEM encoded PKCS #7 structures.
ParseCSR parses a PEM- or DER-encoded PKCS #10 certificate signing request.
ParseCSRPEM parses a PEM-encoded certificate signing request.
ParseOneCertificateFromPEM attempts to parse one PEM encoded certificate object, either a raw x509 certificate or a PKCS #7 structure possibly containing multiple certificates, from the top of certsPEM, which itself may contain multiple PEM encoded certificate objects.
ParsePrivateKeyPEM parses and returns a PEM-encoded private key.
ParsePrivateKeyPEMWithPassword parses and returns a PEM-encoded private key.
ParseSelfSignedCertificatePEM parses a PEM-encoded certificate and check if it is self-signed.
PEMToCertPool concerts PEM certificates to a CertPool.
ReadBytes reads a []byte either from a file or an environment variable.
SCTListFromOCSPResponse extracts the SCTList from an ocsp.Response, returning an empty list if the SCT extension was not found or could not be unmarshalled.
SerializeSCTList serializes a list of SCTs.
SignatureString returns the TLS signature string corresponding to an X509 signature algorithm.
SignerAlgo returns an X.509 signature algorithm from a crypto.Signer.
StringTLSVersion returns underlying enum values from human names for TLS versions, defaults to current golang default of TLS 1.0.
ValidExpiry determines if a certificate is valid for an acceptable length of time per the CA/Browser Forum baseline requirements.