// ParseCRL parses a CRL from the given bytes. It's often the case that PEM
// encoded CRLs will appear where they should be DER encoded, so this function
// will transparently handle PEM encoding as long as there isn't any leading
// garbage.
ParseCRL parses a CRL from the given bytes. It's often the case that PEM
encoded CRLs will appear where they should be DER encoded, so this function
will transparently handle PEM encoding as long as there isn't any leading
garbage.
// ParseCRL parses a CRL from the given bytes . It ' s often the case that PEM // encoded CRLs will appear where they should be DER encoded so this function // will transparently handle PEM encoding as long as there isn ' t any leading // garbage .
func ParseCRL(crlBytes []byte) (certList *pkix.CertificateList, err error) {
	if bytes.HasPrefix(crlBytes, pemCRLPrefix) {
		var (
			crl  *C.X509_CRL
			buf  = unsafe.Pointer(&crlBytes[0])
			blen = C.int(len(crlBytes))
			bio  = C.BIO_new_mem_buf(buf, blen)
		)
		crl = C.PEM_read_bio_X509_CRL(bio, nil, nil, nil)
		if crl != nil {
			return &pkix.CertificateList{}, nil
		}
	}
	return ParseDERCRL(crlBytes)
}
func ParseCRL ( crlBytes [ ] byte ) ( certList * pkix . CertificateList , err error ) { if bytes . HasPrefix ( crlBytes , pemCRLPrefix ) { var ( crl * C . X509_CRL buf = unsafe . Pointer ( & crlBytes [ 0 ] ) blen = C . int ( len ( crlBytes ) ) bio = C . BIO_new_mem_buf ( buf , blen ) ) crl = C . PEM_read_bio_X509_CRL ( bio , nil , nil , nil ) if crl != nil { return & pkix . CertificateList { } , nil } } return ParseDERCRL ( crlBytes ) }
ParseCRL parses a CRL from the given bytes.
ParseCRL parses a CRL from the given bytes .
// use crl