Golang crypto/x509/pkix.RevokedCertificate example

package crypto/x509/pkix

RevokedCertificate represents the ASN.1 structure of the same name. See RFC 5280, section 5.1.

Golang crypto/x509/pkix.RevokedCertificate usage example

 revokedCerts := []pkix.RevokedCertificate{
 {
 SerialNumber: big.NewInt(1),
 RevocationTime: now,
 },
 {
 SerialNumber: big.NewInt(42),
 RevocationTime: now,
 },
 }

Reference :

http://golang.org/pkg/crypto/x509/pkix/#RelativeDistinguishedNameSET

  See also : Golang crypto/x509.Certificate.CreateCRL() function example

Advertisement