Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let userPublicKey;
let userPrivateKey;
const dataBuffer = new ArrayBuffer(6);
const dataView = new Uint8Array(dataBuffer);
dataView[0] = 0x00;
dataView[1] = 0x01;
dataView[2] = 0x02;
dataView[3] = 0x03;
dataView[4] = 0x04;
dataView[5] = 0x05;
let cmsSignedSimpl;
const ocspRequest = new OCSPRequest();
const aTSHashIndex = new ATSHashIndex();
let asn1 = asn1js.fromBER(stringToArrayBuffer(atob(User10cert)));
const certSimpl = new Certificate({ schema: asn1.result });
asn1 = asn1js.fromBER(stringToArrayBuffer(atob(CAcert)));
const caCertSimpl = new Certificate({ schema: asn1.result });
//endregion
//region Get a "crypto" extension
const crypto = getCrypto();
if(typeof crypto === "undefined")
return Promise.reject("No WebCrypto extension found");
//endregion
dataView[0] = 0x00;
dataView[1] = 0x01;
dataView[2] = 0x02;
dataView[3] = 0x03;
dataView[4] = 0x04;
dataView[5] = 0x05;
let cmsSignedSimpl;
const signatureTimeStamp = new SignatureTimeStamp();
const cadesCTimeStamp = new CAdESCTimestamp();
const completeCertificateReferences = new CompleteCertificateReferences();
const completeRevocationReferences = new CompleteRevocationReferences();
const ocspRequest = new OCSPRequest();
let ocspResponse;
let asn1 = asn1js.fromBER(stringToArrayBuffer(atob(User10cert)));
const certSimpl = new Certificate({ schema: asn1.result });
asn1 = asn1js.fromBER(stringToArrayBuffer(atob(CAcert)));
const caCertSimpl = new Certificate({ schema: asn1.result });
//endregion
//region Get a "crypto" extension
const crypto = getCrypto();
if(typeof crypto === "undefined")
return Promise.reject("No WebCrypto extension found");
//endregion