node-opcua-crypto 5.3.4 → 5.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XDS5YIBC.cjs → chunk-CHOBVT6V.cjs} +31 -23
- package/dist/chunk-CHOBVT6V.cjs.map +1 -0
- package/dist/{chunk-P5QLLSP2.js → chunk-JHDYJSUT.js} +12 -2
- package/dist/chunk-JHDYJSUT.js.map +1 -0
- package/dist/{chunk-AZUYUXWD.cjs → chunk-LRB5Q533.cjs} +12 -2
- package/dist/chunk-LRB5Q533.cjs.map +1 -0
- package/dist/{chunk-ULNIL7FF.js → chunk-ZGFOQAZK.js} +11 -3
- package/dist/chunk-ZGFOQAZK.js.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/dist/source/index_web.cjs +2 -2
- package/dist/source/index_web.js +1 -1
- package/dist/source_nodejs/index.cjs +3 -3
- package/dist/source_nodejs/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-AZUYUXWD.cjs.map +0 -1
- package/dist/chunk-P5QLLSP2.js.map +0 -1
- package/dist/chunk-ULNIL7FF.js.map +0 -1
- package/dist/chunk-XDS5YIBC.cjs.map +0 -1
|
@@ -645,7 +645,17 @@ function toPem(raw_key, pem) {
|
|
|
645
645
|
} else {
|
|
646
646
|
pemType = pem;
|
|
647
647
|
_assert2.default.call(void 0, ["CERTIFICATE REQUEST", "CERTIFICATE", "RSA PRIVATE KEY", "PUBLIC KEY", "X509 CRL"].indexOf(pemType) >= 0);
|
|
648
|
-
const
|
|
648
|
+
const buffer = raw_key;
|
|
649
|
+
if (pemType === "CERTIFICATE" && buffer.length > 0) {
|
|
650
|
+
try {
|
|
651
|
+
const parts = split_der(buffer);
|
|
652
|
+
if (parts.length > 1) {
|
|
653
|
+
return parts.map((cert) => toPem(cert, pem)).join("\n");
|
|
654
|
+
}
|
|
655
|
+
} catch (err) {
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
const b = buffer.toString("base64");
|
|
649
659
|
const strBody = _optionalChain([b, 'access', _9 => _9.match, 'call', _10 => _10(/.{1,64}/g), 'optionalAccess', _11 => _11.join, 'call', _12 => _12("\n")]) || "";
|
|
650
660
|
return `-----BEGIN ${pemType}-----
|
|
651
661
|
${strBody}
|
|
@@ -6624,4 +6634,4 @@ asn1js/build/index.es.js:
|
|
|
6624
6634
|
*
|
|
6625
6635
|
*)
|
|
6626
6636
|
*/
|
|
6627
|
-
//# sourceMappingURL=chunk-
|
|
6637
|
+
//# sourceMappingURL=chunk-LRB5Q533.cjs.map
|