We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 253ac40 commit bb58fd0Copy full SHA for bb58fd0
examples/CertificateComplexExample/es6.ts
@@ -37,7 +37,11 @@ function parseCertificate() {
37
//#endregion
38
39
//#region Decode existing X.509 certificate
40
- const certificate = pkijs.Certificate.fromBER(certificateBuffer);
+ const certificates = common.parseCertificate(certificateBuffer);
41
+ if (!certificates.length) {
42
+ throw new Error("Cannot get certificate from the file");
43
+ }
44
+ const certificate = certificates[0];
45
46
47
//#region Put information about X.509 certificate issuer
0 commit comments