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.
- 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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index_web.d.mts +1 -1
- package/dist/index_web.d.ts +1 -1
- 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.d.mts +2 -2
- package/dist/source/index.d.ts +2 -2
- 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.d.mts +1 -1
- package/dist/source/index_web.d.ts +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.d.mts +1 -1
- package/dist/source_nodejs/index.d.ts +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 +4 -4
- package/dist/chunk-VAMKYXNP.mjs.map +0 -1
- /package/dist/{chunk-WYY6WVVJ.mjs.map → chunk-UEV3YRUV.mjs.map} +0 -0
- /package/dist/{common-0xc4gZF8.d.mts → common-CFr95Map.d.mts} +0 -0
- /package/dist/{common-0xc4gZF8.d.ts → common-CFr95Map.d.ts} +0 -0
package/dist/source/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as Certificate, d as CertificatePEM, h as CertificatePurpose, g as CertificateRevocationList, D as DER, K as KeyObject, N as Nonce, b as PEM, P as PrivateKey, e as PrivateKeyPEM, a as PublicKey, f as PublicKeyPEM, S as Signature, c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-
|
|
1
|
+
export { C as Certificate, d as CertificatePEM, h as CertificatePurpose, g as CertificateRevocationList, D as DER, K as KeyObject, N as Nonce, b as PEM, P as PrivateKey, e as PrivateKeyPEM, a as PublicKey, f as PublicKeyPEM, S as Signature, c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-CFr95Map.mjs';
|
|
2
2
|
export { AlgorithmIdentifier, AttributeTypeAndValue, AuthorityKeyIdentifier, BasicConstraints, BitString, BlockInfo, CertificateExtension, CertificateInfo, CertificateInternals, CertificateRevocationListInfo, CertificateSerialNumber, CertificateSigningRequestInfo, ComputeDerivedKeysOptions, CreateSelfSignCertificateOptions, DerivedKeys, DirectoryName, ExtensionRequest, Extensions, Name, PaddingAlgorithm, PrivateKeyInternals, PublicKeyLength, RSA_PKCS1_OAEP_PADDING, RSA_PKCS1_PADDING, RevokedCertificate, SignatureValue, Subject, SubjectOptions, SubjectPublicKey, SubjectPublicKeyInfo, TBSCertList, TagType, TbsCertificate, Validity, VerifyChunkSignatureOptions, VerifyMessageChunkSignatureOptions, Version, X509ExtKeyUsage, X509KeyUsage, _VerifyStatus, _coercePrivateKey, _findBlockAtIndex, _getBlock, _readAlgorithmIdentifier, _readBitString, _readBooleanValue, _readDirectoryName, _readECCAlgorithmIdentifier, _readExtension, _readIntegerAsByteString, _readIntegerValue, _readListOfInteger, _readLongIntegerValue, _readObjectIdentifier, _readOctetString, _readSignatureValue, _readSignatureValueBin, _readStruct, _readTime, _readValue, _readVersionValue, certificateMatchesPrivateKey, coerceCertificate, coerceCertificatePem, coercePEMorDerToPrivateKey, coercePrivateKeyPem, coercePublicKeyPem, coerceRsaPublicKeyPem, combine_der, compactDirectoryName, computeDerivedKeys, computePaddingFooter, convertPEMtoDER, createCertificateSigningRequest, createSelfSignedCertificate, decryptBufferWithDerivedKeys, derToPrivateKey, encryptBufferWithDerivedKeys, exploreCertificate, exploreCertificateInfo, exploreCertificateRevocationList, exploreCertificateSigningRequest, explorePrivateKey, extractPublicKeyFromCertificate, extractPublicKeyFromCertificateSync, formatBuffer2DigitHexWithColum, generateKeyPair, generatePrivateKey, hexDump, identifyPemType, makeMessageChunkSignature, makeMessageChunkSignatureWithDerivedKeys, makePrivateKeyFromPem, makePseudoRandomBuffer, makeSHA1Thumbprint, parseBitString, pemToPrivateKey, privateDecrypt, privateDecrypt_long, privateDecrypt_native, privateKeyToPEM, publicEncrypt, publicEncrypt_long, publicEncrypt_native, publicKeyAndPrivateKeyMatches, readCertificationRequestInfo, readNameForCrl, readTag, readTbsCertificate, reduceLength, removePadding, removeTrailingLF, rsaLengthPrivateKey, rsaLengthPublicKey, rsaLengthRsaPublicKey, split_der, toPem, toPem2, verifyCertificateChain, verifyCertificateOrClrSignature, verifyCertificateRevocationListSignature, verifyCertificateSignature, verifyChunkSignature, verifyChunkSignatureWithDerivedKeys, verifyMessageChunkSignature } from './index.mjs';
|
|
3
3
|
import 'crypto';
|
|
4
4
|
import '@peculiar/x509';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as Certificate, d as CertificatePEM, h as CertificatePurpose, g as CertificateRevocationList, D as DER, K as KeyObject, N as Nonce, b as PEM, P as PrivateKey, e as PrivateKeyPEM, a as PublicKey, f as PublicKeyPEM, S as Signature, c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-
|
|
1
|
+
export { C as Certificate, d as CertificatePEM, h as CertificatePurpose, g as CertificateRevocationList, D as DER, K as KeyObject, N as Nonce, b as PEM, P as PrivateKey, e as PrivateKeyPEM, a as PublicKey, f as PublicKeyPEM, S as Signature, c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-CFr95Map.js';
|
|
2
2
|
export { AlgorithmIdentifier, AttributeTypeAndValue, AuthorityKeyIdentifier, BasicConstraints, BitString, BlockInfo, CertificateExtension, CertificateInfo, CertificateInternals, CertificateRevocationListInfo, CertificateSerialNumber, CertificateSigningRequestInfo, ComputeDerivedKeysOptions, CreateSelfSignCertificateOptions, DerivedKeys, DirectoryName, ExtensionRequest, Extensions, Name, PaddingAlgorithm, PrivateKeyInternals, PublicKeyLength, RSA_PKCS1_OAEP_PADDING, RSA_PKCS1_PADDING, RevokedCertificate, SignatureValue, Subject, SubjectOptions, SubjectPublicKey, SubjectPublicKeyInfo, TBSCertList, TagType, TbsCertificate, Validity, VerifyChunkSignatureOptions, VerifyMessageChunkSignatureOptions, Version, X509ExtKeyUsage, X509KeyUsage, _VerifyStatus, _coercePrivateKey, _findBlockAtIndex, _getBlock, _readAlgorithmIdentifier, _readBitString, _readBooleanValue, _readDirectoryName, _readECCAlgorithmIdentifier, _readExtension, _readIntegerAsByteString, _readIntegerValue, _readListOfInteger, _readLongIntegerValue, _readObjectIdentifier, _readOctetString, _readSignatureValue, _readSignatureValueBin, _readStruct, _readTime, _readValue, _readVersionValue, certificateMatchesPrivateKey, coerceCertificate, coerceCertificatePem, coercePEMorDerToPrivateKey, coercePrivateKeyPem, coercePublicKeyPem, coerceRsaPublicKeyPem, combine_der, compactDirectoryName, computeDerivedKeys, computePaddingFooter, convertPEMtoDER, createCertificateSigningRequest, createSelfSignedCertificate, decryptBufferWithDerivedKeys, derToPrivateKey, encryptBufferWithDerivedKeys, exploreCertificate, exploreCertificateInfo, exploreCertificateRevocationList, exploreCertificateSigningRequest, explorePrivateKey, extractPublicKeyFromCertificate, extractPublicKeyFromCertificateSync, formatBuffer2DigitHexWithColum, generateKeyPair, generatePrivateKey, hexDump, identifyPemType, makeMessageChunkSignature, makeMessageChunkSignatureWithDerivedKeys, makePrivateKeyFromPem, makePseudoRandomBuffer, makeSHA1Thumbprint, parseBitString, pemToPrivateKey, privateDecrypt, privateDecrypt_long, privateDecrypt_native, privateKeyToPEM, publicEncrypt, publicEncrypt_long, publicEncrypt_native, publicKeyAndPrivateKeyMatches, readCertificationRequestInfo, readNameForCrl, readTag, readTbsCertificate, reduceLength, removePadding, removeTrailingLF, rsaLengthPrivateKey, rsaLengthPublicKey, rsaLengthRsaPublicKey, split_der, toPem, toPem2, verifyCertificateChain, verifyCertificateOrClrSignature, verifyCertificateRevocationListSignature, verifyCertificateSignature, verifyChunkSignature, verifyChunkSignatureWithDerivedKeys, verifyMessageChunkSignature } from './index.js';
|
|
3
3
|
import 'crypto';
|
|
4
4
|
import '@peculiar/x509';
|
package/dist/source/index_web.js
CHANGED
|
@@ -1744,19 +1744,20 @@ var x509 = __toESM(require("@peculiar/x509"));
|
|
|
1744
1744
|
var import_webcrypto = require("@peculiar/webcrypto");
|
|
1745
1745
|
var import_crypto5 = __toESM(require("crypto"));
|
|
1746
1746
|
var x5092 = __toESM(require("@peculiar/x509"));
|
|
1747
|
+
var doDebug3 = false;
|
|
1747
1748
|
var _crypto;
|
|
1748
1749
|
var ignoreCrypto = process.env.IGNORE_SUBTLE_FROM_CRYPTO;
|
|
1749
1750
|
if (typeof window === "undefined") {
|
|
1750
1751
|
_crypto = import_crypto5.default;
|
|
1751
1752
|
if (!_crypto?.subtle || ignoreCrypto) {
|
|
1752
1753
|
_crypto = new import_webcrypto.Crypto();
|
|
1753
|
-
console.warn("using @peculiar/webcrypto");
|
|
1754
|
+
doDebug3 && console.warn("using @peculiar/webcrypto");
|
|
1754
1755
|
} else {
|
|
1755
|
-
console.warn("using nodejs crypto (native)");
|
|
1756
|
+
doDebug3 && console.warn("using nodejs crypto (native)");
|
|
1756
1757
|
}
|
|
1757
1758
|
x509.cryptoProvider.set(_crypto);
|
|
1758
1759
|
} else {
|
|
1759
|
-
console.warn("using browser crypto (native)");
|
|
1760
|
+
doDebug3 && console.warn("using browser crypto (native)");
|
|
1760
1761
|
_crypto = crypto;
|
|
1761
1762
|
x509.cryptoProvider.set(crypto);
|
|
1762
1763
|
}
|
|
@@ -6166,7 +6167,7 @@ async function createSelfSignedCertificate({
|
|
|
6166
6167
|
|
|
6167
6168
|
// source/x509/coerce_private_key.ts
|
|
6168
6169
|
var crypto2 = getCrypto();
|
|
6169
|
-
var
|
|
6170
|
+
var doDebug4 = false;
|
|
6170
6171
|
function coercePEMorDerToPrivateKey(privateKeyInDerOrPem) {
|
|
6171
6172
|
if (typeof privateKeyInDerOrPem === "string") {
|
|
6172
6173
|
const hidden = createPrivateKeyFromNodeJSCrypto(privateKeyInDerOrPem);
|
|
@@ -6184,7 +6185,7 @@ async function _coercePrivateKey(privateKey) {
|
|
|
6184
6185
|
const privateKey1 = await pemToPrivateKey(privateKey);
|
|
6185
6186
|
return KeyObject4.from(privateKey1);
|
|
6186
6187
|
} catch (err) {
|
|
6187
|
-
|
|
6188
|
+
doDebug4 && console.log(privateKey);
|
|
6188
6189
|
throw err;
|
|
6189
6190
|
}
|
|
6190
6191
|
} else if (privateKey instanceof KeyObject4) {
|