Skip to content

parseCertificateRevocationListPemOrThrow

Decodes a PEM-encoded X.509 CRL (-----BEGIN X509 CRL-----).

ts
function parseCertificateRevocationListPemOrThrow(
	pem: string,
): ParsedCertificateRevocationList

Parameters

  • pem: string

Examples

ts
import { parseCertificateRevocationListPemOrThrow } from 'micro509';

const crl = parseCertificateRevocationListPemOrThrow(pemString); // throws if malformed
console.log(crl.issuer.values.commonName, crl.revokedCertificates.length);

Released under the MIT License.