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.
@@ -72,7 +72,7 @@ import {
72
72
  verifyChunkSignature,
73
73
  verifyChunkSignatureWithDerivedKeys,
74
74
  verifyMessageChunkSignature
75
- } from "../chunk-F5EAPW2U.mjs";
75
+ } from "../chunk-EURHGMEG.mjs";
76
76
  export {
77
77
  CertificatePurpose,
78
78
  PaddingAlgorithm,
@@ -1,11 +1,8 @@
1
- import { C as Certificate, P as PrivateKey, d as CertificatePEM, b as PEM, D as DER, 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-CFr95Map.mjs';
2
- export { c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-CFr95Map.mjs';
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]: any;
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: any;
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?: any;
150
+ subjectAltName?: {
151
+ [key: string]: string[];
152
+ };
152
153
  }
153
154
  interface TbsCertificate {
154
155
  version: number;
155
156
  serialNumber: string;
156
- issuer: any;
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: any;
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(privateKey: PrivateKey): Buffer;
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: any): Promise<KeyObject>;
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, P as PrivateKey, d as CertificatePEM, b as PEM, D as DER, 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-CFr95Map.js';
2
- export { c as createPrivateKeyFromNodeJSCrypto, i as isKeyObject } from '../common-CFr95Map.js';
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]: any;
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: any;
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?: any;
150
+ subjectAltName?: {
151
+ [key: string]: string[];
152
+ };
152
153
  }
153
154
  interface TbsCertificate {
154
155
  version: number;
155
156
  serialNumber: string;
156
- issuer: any;
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: any;
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(privateKey: PrivateKey): Buffer;
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: any): Promise<KeyObject>;
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;