1 year ago

#124770

test-img

karanpreet singh wadhwa

How to add CRLs to caStore created by Node-forge

I have create a caStore and want to add CRLs to it so that the caStore can reject the same when came across. I have looked everywhere but unable to find the same

  const pki = forge.pki;
  const asn1 = require('asn1js');
  let caStore = forge.pki.createCaStore(CAsList);
  
  let customCertificate = pki.certificateFromPem(certificateString);
  let cRLDistributionPoint = customCertificate.getExtension('cRLDistributionPoints');
  let crlUrl = forge.asn1.fromDer(cRLDistributionPoint.value);
  let crlCertFetched =  await fetch(crlUrl);
  let crlCertBuffer = crlCertFetched.arrayBuffer();
  let crlCertAsn1Format = asn1.fromBER(crlCertBuffer);

  // Q. How to add crlCertAsn1Format/crlCertBuffer/crlCert to caStore???

If it is not possible to add CRL in caStore of Node-forge, is there any-other way that I can use this CRL to do the needful?

node.js

x509

pki

certificate-revocation

node-forge

0 Answers

Your Answer

Accepted video resources