node-opcua-crypto 4.9.2 → 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.
@@ -6,7 +6,7 @@ import {
6
6
  privateKeyToPEM,
7
7
  removeTrailingLF,
8
8
  toPem
9
- } from "./chunk-VAMKYXNP.mjs";
9
+ } from "./chunk-WLW5XUML.mjs";
10
10
 
11
11
  // source_nodejs/read.ts
12
12
  import assert from "assert";
@@ -170,4 +170,4 @@ export {
170
170
  generatePrivateKeyFile,
171
171
  generatePrivateKeyFileAlternate
172
172
  };
173
- //# sourceMappingURL=chunk-WYY6WVVJ.mjs.map
173
+ //# sourceMappingURL=chunk-UEV3YRUV.mjs.map
@@ -1639,19 +1639,20 @@ import * as x509 from "@peculiar/x509";
1639
1639
  import { Crypto as PeculiarWebCrypto } from "@peculiar/webcrypto";
1640
1640
  import nativeCrypto from "crypto";
1641
1641
  import * as x5092 from "@peculiar/x509";
1642
+ var doDebug3 = false;
1642
1643
  var _crypto;
1643
1644
  var ignoreCrypto = process.env.IGNORE_SUBTLE_FROM_CRYPTO;
1644
1645
  if (typeof window === "undefined") {
1645
1646
  _crypto = nativeCrypto;
1646
1647
  if (!_crypto?.subtle || ignoreCrypto) {
1647
1648
  _crypto = new PeculiarWebCrypto();
1648
- console.warn("using @peculiar/webcrypto");
1649
+ doDebug3 && console.warn("using @peculiar/webcrypto");
1649
1650
  } else {
1650
- console.warn("using nodejs crypto (native)");
1651
+ doDebug3 && console.warn("using nodejs crypto (native)");
1651
1652
  }
1652
1653
  x509.cryptoProvider.set(_crypto);
1653
1654
  } else {
1654
- console.warn("using browser crypto (native)");
1655
+ doDebug3 && console.warn("using browser crypto (native)");
1655
1656
  _crypto = crypto;
1656
1657
  x509.cryptoProvider.set(crypto);
1657
1658
  }
@@ -6061,7 +6062,7 @@ async function createSelfSignedCertificate({
6061
6062
 
6062
6063
  // source/x509/coerce_private_key.ts
6063
6064
  var crypto2 = getCrypto();
6064
- var doDebug3 = false;
6065
+ var doDebug4 = false;
6065
6066
  function coercePEMorDerToPrivateKey(privateKeyInDerOrPem) {
6066
6067
  if (typeof privateKeyInDerOrPem === "string") {
6067
6068
  const hidden = createPrivateKeyFromNodeJSCrypto(privateKeyInDerOrPem);
@@ -6079,7 +6080,7 @@ async function _coercePrivateKey(privateKey) {
6079
6080
  const privateKey1 = await pemToPrivateKey(privateKey);
6080
6081
  return KeyObject4.from(privateKey1);
6081
6082
  } catch (err) {
6082
- doDebug3 && console.log(privateKey);
6083
+ doDebug4 && console.log(privateKey);
6083
6084
  throw err;
6084
6085
  }
6085
6086
  } else if (privateKey instanceof KeyObject4) {
@@ -6257,4 +6258,4 @@ asn1js/build/index.es.js:
6257
6258
  *
6258
6259
  *)
6259
6260
  */
6260
- //# sourceMappingURL=chunk-VAMKYXNP.mjs.map
6261
+ //# sourceMappingURL=chunk-WLW5XUML.mjs.map