node-opcua-crypto 4.16.0 → 4.17.0
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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/{chunk-XPM4YIBT.mjs → chunk-CQ5JIXZF.mjs} +39 -38
- package/dist/chunk-CQ5JIXZF.mjs.map +1 -0
- package/dist/{chunk-F5EAPW2U.mjs → chunk-EURHGMEG.mjs} +846 -660
- package/dist/chunk-EURHGMEG.mjs.map +1 -0
- package/dist/{common-CFr95Map.d.mts → common-DxHkx4Pv.d.mts} +2 -2
- package/dist/{common-CFr95Map.d.ts → common-DxHkx4Pv.d.ts} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +919 -726
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/source/index.d.mts +2 -2
- package/dist/source/index.d.ts +2 -2
- package/dist/source/index.js +873 -681
- package/dist/source/index.js.map +1 -1
- package/dist/source/index.mjs +1 -1
- package/dist/source/index_web.d.mts +17 -17
- package/dist/source/index_web.d.ts +17 -17
- package/dist/source/index_web.js +873 -681
- package/dist/source/index_web.js.map +1 -1
- package/dist/source/index_web.mjs +1 -1
- package/dist/source_nodejs/index.d.mts +11 -11
- package/dist/source_nodejs/index.d.ts +11 -11
- package/dist/source_nodejs/index.js +298 -309
- package/dist/source_nodejs/index.js.map +1 -1
- package/dist/source_nodejs/index.mjs +2 -2
- package/package.json +5 -6
- package/dist/chunk-F5EAPW2U.mjs.map +0 -1
- package/dist/chunk-XPM4YIBT.mjs.map +0 -1
package/dist/source/index.mjs
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { C as Certificate,
|
|
2
|
-
export { c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-
|
|
3
|
-
import { KeyLike } from 'crypto';
|
|
1
|
+
import { C as Certificate, d as CertificatePEM, b as PEM, D as DER, P as PrivateKey, f as PublicKeyPEM, S as Signature, K as KeyObject, e as PrivateKeyPEM, a as PublicKey, N as Nonce, g as CertificateRevocationList, h as CertificatePurpose } from '../common-DxHkx4Pv.mjs';
|
|
2
|
+
export { c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-DxHkx4Pv.mjs';
|
|
3
|
+
import { KeyLike } from 'node:crypto';
|
|
4
4
|
import * as x509 from '@peculiar/x509';
|
|
5
5
|
|
|
6
|
-
declare function publicKeyAndPrivateKeyMatches(certificate: Certificate, privateKey: PrivateKey): boolean;
|
|
7
|
-
declare function certificateMatchesPrivateKey(certificate: Certificate, privateKey: PrivateKey): boolean;
|
|
8
|
-
|
|
9
6
|
interface DirectoryName {
|
|
10
7
|
stateOrProvinceName?: string;
|
|
11
8
|
localityName?: string;
|
|
@@ -88,7 +85,7 @@ declare function exploreCertificateInfo(certificate: Certificate | CertificatePE
|
|
|
88
85
|
*/
|
|
89
86
|
|
|
90
87
|
interface AttributeTypeAndValue {
|
|
91
|
-
[key: string]:
|
|
88
|
+
[key: string]: unknown;
|
|
92
89
|
}
|
|
93
90
|
interface Validity {
|
|
94
91
|
notBefore: Date;
|
|
@@ -124,7 +121,9 @@ declare function readExtension(buffer: Buffer, block: BlockInfo): {
|
|
|
124
121
|
oid: string;
|
|
125
122
|
name: string;
|
|
126
123
|
};
|
|
127
|
-
value:
|
|
124
|
+
value: string | X509KeyUsage | X509ExtKeyUsage | AuthorityKeyIdentifier | BasicConstraints | {
|
|
125
|
+
[key: string]: string[];
|
|
126
|
+
};
|
|
128
127
|
};
|
|
129
128
|
interface SubjectPublicKeyInfo {
|
|
130
129
|
algorithm: string;
|
|
@@ -148,12 +147,14 @@ interface CertificateExtension {
|
|
|
148
147
|
authorityKeyIdentifier?: AuthorityKeyIdentifier;
|
|
149
148
|
keyUsage?: X509KeyUsage;
|
|
150
149
|
extKeyUsage?: X509ExtKeyUsage;
|
|
151
|
-
subjectAltName?:
|
|
150
|
+
subjectAltName?: {
|
|
151
|
+
[key: string]: string[];
|
|
152
|
+
};
|
|
152
153
|
}
|
|
153
154
|
interface TbsCertificate {
|
|
154
155
|
version: number;
|
|
155
156
|
serialNumber: string;
|
|
156
|
-
issuer:
|
|
157
|
+
issuer: DirectoryName;
|
|
157
158
|
signature: AlgorithmIdentifier;
|
|
158
159
|
validity: Validity;
|
|
159
160
|
subject: DirectoryName;
|
|
@@ -368,7 +369,7 @@ declare function exploreCertificateRevocationList(crl: CertificateRevocationList
|
|
|
368
369
|
interface ExtensionRequest {
|
|
369
370
|
basicConstraints: BasicConstraints;
|
|
370
371
|
keyUsage: X509KeyUsage;
|
|
371
|
-
subjectAltName:
|
|
372
|
+
subjectAltName: string;
|
|
372
373
|
}
|
|
373
374
|
interface CertificateSigningRequestInfo {
|
|
374
375
|
extensionRequest: ExtensionRequest;
|
|
@@ -406,7 +407,10 @@ declare function explorePrivateKey(privateKey2: PrivateKey): PrivateKeyInternals
|
|
|
406
407
|
|
|
407
408
|
declare function makePrivateKeyFromPem(privateKeyInPem: string): PrivateKey;
|
|
408
409
|
|
|
409
|
-
declare function makePrivateKeyThumbPrint(
|
|
410
|
+
declare function makePrivateKeyThumbPrint(_privateKey: PrivateKey): Buffer;
|
|
411
|
+
|
|
412
|
+
declare function publicKeyAndPrivateKeyMatches(certificate: Certificate, privateKey: PrivateKey): boolean;
|
|
413
|
+
declare function certificateMatchesPrivateKey(certificate: Certificate, privateKey: PrivateKey): boolean;
|
|
410
414
|
|
|
411
415
|
interface SubjectOptions {
|
|
412
416
|
commonName?: string;
|
|
@@ -450,7 +454,7 @@ declare function coercePEMorDerToPrivateKey(privateKeyInDerOrPem: string | Buffe
|
|
|
450
454
|
*
|
|
451
455
|
* @private
|
|
452
456
|
*/
|
|
453
|
-
declare function _coercePrivateKey(privateKey:
|
|
457
|
+
declare function _coercePrivateKey(privateKey: unknown): Promise<KeyObject>;
|
|
454
458
|
|
|
455
459
|
interface CreateCertificateSigningRequestOptions {
|
|
456
460
|
privateKey: CryptoKey;
|
|
@@ -503,10 +507,6 @@ declare function createSelfSignedCertificate({ privateKey, notAfter, notBefore,
|
|
|
503
507
|
der: x509.X509Certificate;
|
|
504
508
|
}>;
|
|
505
509
|
|
|
506
|
-
/**
|
|
507
|
-
* @module node_opcua_crypto
|
|
508
|
-
*/
|
|
509
|
-
|
|
510
510
|
declare const asn1: {
|
|
511
511
|
readDirectoryName: typeof readDirectoryName;
|
|
512
512
|
readTag: typeof readTag;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { C as Certificate,
|
|
2
|
-
export { c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-
|
|
3
|
-
import { KeyLike } from 'crypto';
|
|
1
|
+
import { C as Certificate, d as CertificatePEM, b as PEM, D as DER, P as PrivateKey, f as PublicKeyPEM, S as Signature, K as KeyObject, e as PrivateKeyPEM, a as PublicKey, N as Nonce, g as CertificateRevocationList, h as CertificatePurpose } from '../common-DxHkx4Pv.js';
|
|
2
|
+
export { c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-DxHkx4Pv.js';
|
|
3
|
+
import { KeyLike } from 'node:crypto';
|
|
4
4
|
import * as x509 from '@peculiar/x509';
|
|
5
5
|
|
|
6
|
-
declare function publicKeyAndPrivateKeyMatches(certificate: Certificate, privateKey: PrivateKey): boolean;
|
|
7
|
-
declare function certificateMatchesPrivateKey(certificate: Certificate, privateKey: PrivateKey): boolean;
|
|
8
|
-
|
|
9
6
|
interface DirectoryName {
|
|
10
7
|
stateOrProvinceName?: string;
|
|
11
8
|
localityName?: string;
|
|
@@ -88,7 +85,7 @@ declare function exploreCertificateInfo(certificate: Certificate | CertificatePE
|
|
|
88
85
|
*/
|
|
89
86
|
|
|
90
87
|
interface AttributeTypeAndValue {
|
|
91
|
-
[key: string]:
|
|
88
|
+
[key: string]: unknown;
|
|
92
89
|
}
|
|
93
90
|
interface Validity {
|
|
94
91
|
notBefore: Date;
|
|
@@ -124,7 +121,9 @@ declare function readExtension(buffer: Buffer, block: BlockInfo): {
|
|
|
124
121
|
oid: string;
|
|
125
122
|
name: string;
|
|
126
123
|
};
|
|
127
|
-
value:
|
|
124
|
+
value: string | X509KeyUsage | X509ExtKeyUsage | AuthorityKeyIdentifier | BasicConstraints | {
|
|
125
|
+
[key: string]: string[];
|
|
126
|
+
};
|
|
128
127
|
};
|
|
129
128
|
interface SubjectPublicKeyInfo {
|
|
130
129
|
algorithm: string;
|
|
@@ -148,12 +147,14 @@ interface CertificateExtension {
|
|
|
148
147
|
authorityKeyIdentifier?: AuthorityKeyIdentifier;
|
|
149
148
|
keyUsage?: X509KeyUsage;
|
|
150
149
|
extKeyUsage?: X509ExtKeyUsage;
|
|
151
|
-
subjectAltName?:
|
|
150
|
+
subjectAltName?: {
|
|
151
|
+
[key: string]: string[];
|
|
152
|
+
};
|
|
152
153
|
}
|
|
153
154
|
interface TbsCertificate {
|
|
154
155
|
version: number;
|
|
155
156
|
serialNumber: string;
|
|
156
|
-
issuer:
|
|
157
|
+
issuer: DirectoryName;
|
|
157
158
|
signature: AlgorithmIdentifier;
|
|
158
159
|
validity: Validity;
|
|
159
160
|
subject: DirectoryName;
|
|
@@ -368,7 +369,7 @@ declare function exploreCertificateRevocationList(crl: CertificateRevocationList
|
|
|
368
369
|
interface ExtensionRequest {
|
|
369
370
|
basicConstraints: BasicConstraints;
|
|
370
371
|
keyUsage: X509KeyUsage;
|
|
371
|
-
subjectAltName:
|
|
372
|
+
subjectAltName: string;
|
|
372
373
|
}
|
|
373
374
|
interface CertificateSigningRequestInfo {
|
|
374
375
|
extensionRequest: ExtensionRequest;
|
|
@@ -406,7 +407,10 @@ declare function explorePrivateKey(privateKey2: PrivateKey): PrivateKeyInternals
|
|
|
406
407
|
|
|
407
408
|
declare function makePrivateKeyFromPem(privateKeyInPem: string): PrivateKey;
|
|
408
409
|
|
|
409
|
-
declare function makePrivateKeyThumbPrint(
|
|
410
|
+
declare function makePrivateKeyThumbPrint(_privateKey: PrivateKey): Buffer;
|
|
411
|
+
|
|
412
|
+
declare function publicKeyAndPrivateKeyMatches(certificate: Certificate, privateKey: PrivateKey): boolean;
|
|
413
|
+
declare function certificateMatchesPrivateKey(certificate: Certificate, privateKey: PrivateKey): boolean;
|
|
410
414
|
|
|
411
415
|
interface SubjectOptions {
|
|
412
416
|
commonName?: string;
|
|
@@ -450,7 +454,7 @@ declare function coercePEMorDerToPrivateKey(privateKeyInDerOrPem: string | Buffe
|
|
|
450
454
|
*
|
|
451
455
|
* @private
|
|
452
456
|
*/
|
|
453
|
-
declare function _coercePrivateKey(privateKey:
|
|
457
|
+
declare function _coercePrivateKey(privateKey: unknown): Promise<KeyObject>;
|
|
454
458
|
|
|
455
459
|
interface CreateCertificateSigningRequestOptions {
|
|
456
460
|
privateKey: CryptoKey;
|
|
@@ -503,10 +507,6 @@ declare function createSelfSignedCertificate({ privateKey, notAfter, notBefore,
|
|
|
503
507
|
der: x509.X509Certificate;
|
|
504
508
|
}>;
|
|
505
509
|
|
|
506
|
-
/**
|
|
507
|
-
* @module node_opcua_crypto
|
|
508
|
-
*/
|
|
509
|
-
|
|
510
510
|
declare const asn1: {
|
|
511
511
|
readDirectoryName: typeof readDirectoryName;
|
|
512
512
|
readTag: typeof readTag;
|