const CertificateBlockType … const CertificateRequestBlockType … // ParseCertsPEM returns the x509.Certificates contained in the given PEM-encoded byte array // Returns an error if a certificate could not be parsed, or if the data does not contain any certificates func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error) { … } // EncodeCertificates returns the PEM-encoded byte array that represents by the specified certs. func EncodeCertificates(certs ...*x509.Certificate) ([]byte, error) { … }