node-opcua-crypto 4.9.3 → 4.9.4
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-WYY6WVVJ.mjs → chunk-UEV3YRUV.mjs} +2 -2
- package/dist/{chunk-VAMKYXNP.mjs → chunk-WLW5XUML.mjs} +7 -6
- package/dist/chunk-WLW5XUML.mjs.map +1 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index_web.js +6 -5
- package/dist/index_web.js.map +1 -1
- package/dist/index_web.mjs +1 -1
- package/dist/source/index.js +6 -5
- package/dist/source/index.js.map +1 -1
- package/dist/source/index.mjs +1 -1
- package/dist/source/index_web.js +6 -5
- package/dist/source/index_web.js.map +1 -1
- package/dist/source/index_web.mjs +1 -1
- package/dist/source_nodejs/index.js +4 -3
- package/dist/source_nodejs/index.js.map +1 -1
- package/dist/source_nodejs/index.mjs +2 -2
- package/package.json +2 -2
- package/dist/chunk-VAMKYXNP.mjs.map +0 -1
- /package/dist/{chunk-WYY6WVVJ.mjs.map → chunk-UEV3YRUV.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1759,19 +1759,20 @@ var x509 = __toESM(require("@peculiar/x509"));
|
|
|
1759
1759
|
var import_webcrypto = require("@peculiar/webcrypto");
|
|
1760
1760
|
var import_crypto5 = __toESM(require("crypto"));
|
|
1761
1761
|
var x5092 = __toESM(require("@peculiar/x509"));
|
|
1762
|
+
var doDebug3 = false;
|
|
1762
1763
|
var _crypto;
|
|
1763
1764
|
var ignoreCrypto = process.env.IGNORE_SUBTLE_FROM_CRYPTO;
|
|
1764
1765
|
if (typeof window === "undefined") {
|
|
1765
1766
|
_crypto = import_crypto5.default;
|
|
1766
1767
|
if (!_crypto?.subtle || ignoreCrypto) {
|
|
1767
1768
|
_crypto = new import_webcrypto.Crypto();
|
|
1768
|
-
console.warn("using @peculiar/webcrypto");
|
|
1769
|
+
doDebug3 && console.warn("using @peculiar/webcrypto");
|
|
1769
1770
|
} else {
|
|
1770
|
-
console.warn("using nodejs crypto (native)");
|
|
1771
|
+
doDebug3 && console.warn("using nodejs crypto (native)");
|
|
1771
1772
|
}
|
|
1772
1773
|
x509.cryptoProvider.set(_crypto);
|
|
1773
1774
|
} else {
|
|
1774
|
-
console.warn("using browser crypto (native)");
|
|
1775
|
+
doDebug3 && console.warn("using browser crypto (native)");
|
|
1775
1776
|
_crypto = crypto;
|
|
1776
1777
|
x509.cryptoProvider.set(crypto);
|
|
1777
1778
|
}
|
|
@@ -6181,7 +6182,7 @@ async function createSelfSignedCertificate({
|
|
|
6181
6182
|
|
|
6182
6183
|
// source/x509/coerce_private_key.ts
|
|
6183
6184
|
var crypto2 = getCrypto();
|
|
6184
|
-
var
|
|
6185
|
+
var doDebug4 = false;
|
|
6185
6186
|
function coercePEMorDerToPrivateKey(privateKeyInDerOrPem) {
|
|
6186
6187
|
if (typeof privateKeyInDerOrPem === "string") {
|
|
6187
6188
|
const hidden = createPrivateKeyFromNodeJSCrypto(privateKeyInDerOrPem);
|
|
@@ -6199,7 +6200,7 @@ async function _coercePrivateKey(privateKey) {
|
|
|
6199
6200
|
const privateKey1 = await pemToPrivateKey(privateKey);
|
|
6200
6201
|
return KeyObject4.from(privateKey1);
|
|
6201
6202
|
} catch (err) {
|
|
6202
|
-
|
|
6203
|
+
doDebug4 && console.log(privateKey);
|
|
6203
6204
|
throw err;
|
|
6204
6205
|
}
|
|
6205
6206
|
} else if (privateKey instanceof KeyObject4) {
|