node-opcua-crypto 4.5.0 → 4.6.1
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-cjs/common-0xc4gZF8.d.ts +44 -0
- package/dist-cjs/index.d.ts +5 -0
- package/dist-cjs/source/index.d.ts +523 -0
- package/dist-cjs/source/index_web.d.ts +4 -0
- package/dist-cjs/source_nodejs/index.d.ts +46 -0
- package/{dist/chunk-SNCRM4BA.mjs → dist-esm/chunk-D3SBIIXU.mjs} +1 -1
- package/{dist/chunk-UZNNRQTR.mjs → dist-esm/chunk-R33OLRZV.mjs} +2 -2
- package/dist-esm/common-0xc4gZF8.d.ts +44 -0
- package/dist-esm/index.d.mts +5 -0
- package/{dist → dist-esm}/index.mjs +2 -2
- package/dist-esm/source/index.d.mts +523 -0
- package/{dist → dist-esm}/source/index.mjs +1 -1
- package/dist-esm/source/index_web.d.mts +4 -0
- package/{dist → dist-esm}/source/index_web.mjs +1 -1
- package/dist-esm/source_nodejs/index.d.mts +46 -0
- package/{dist → dist-esm}/source_nodejs/index.mjs +2 -2
- package/index.mjs +1 -0
- package/package.json +18 -28
- package/dist-types/index.d.ts +0 -2
- package/dist-types/source/asn1.d.ts +0 -73
- package/dist-types/source/buffer_utils.d.ts +0 -6
- package/dist-types/source/common.d.ts +0 -44
- package/dist-types/source/crypto_explore_certificate.d.ts +0 -107
- package/dist-types/source/crypto_utils.d.ts +0 -58
- package/dist-types/source/crypto_utils2.d.ts +0 -27
- package/dist-types/source/derived_keys.d.ts +0 -72
- package/dist-types/source/explore_certificate.d.ts +0 -27
- package/dist-types/source/explore_certificate_revocation_list.d.ts +0 -28
- package/dist-types/source/explore_certificate_signing_request.d.ts +0 -13
- package/dist-types/source/explore_private_key.d.ts +0 -29
- package/dist-types/source/index.d.ts +0 -21
- package/dist-types/source/make_private_key_from_pem.d.ts +0 -2
- package/dist-types/source/oid_map.d.ts +0 -7
- package/dist-types/source/public_private_match.d.ts +0 -3
- package/dist-types/source/subject.d.ts +0 -27
- package/dist-types/source/verify_certificate_signature.d.ts +0 -10
- package/dist-types/source/x509/_build_public_key.d.ts +0 -1
- package/dist-types/source/x509/_crypto.d.ts +0 -3
- package/dist-types/source/x509/_get_attributes.d.ts +0 -8
- package/dist-types/source/x509/coerce_private_key.d.ts +0 -8
- package/dist-types/source/x509/create_certificate_signing_request.d.ts +0 -18
- package/dist-types/source/x509/create_key_pair.d.ts +0 -14
- package/dist-types/source/x509/create_self_signed_certificate.d.ts +0 -21
- package/dist-types/source_nodejs/generate_private_key_filename.d.ts +0 -7
- package/dist-types/source_nodejs/index.d.ts +0 -4
- package/dist-types/source_nodejs/read.d.ts +0 -30
- package/dist-types/source_nodejs/read_certificate_revocation_list.d.ts +0 -2
- package/dist-types/source_nodejs/read_certificate_signing_request.d.ts +0 -3
- package/node-opcua-crypto-4.2.0.tgz +0 -0
- /package/{dist → dist-cjs}/index.js +0 -0
- /package/{dist → dist-cjs}/source/index.js +0 -0
- /package/{dist → dist-cjs}/source/index_web.js +0 -0
- /package/{dist → dist-cjs}/source_nodejs/index.js +0 -0
- /package/{dist → dist-esm}/chunk-5NV4OKIV.mjs +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Certificate } from "./common.js";
|
|
3
|
-
export declare function verifyCertificateOrClrSignature(certificateOrCrl: Buffer, parentCertificate: Certificate): boolean;
|
|
4
|
-
export declare function verifyCertificateSignature(certificate: Certificate, parentCertificate: Certificate): boolean;
|
|
5
|
-
export declare function verifyCertificateRevocationListSignature(certificateRevocationList: Certificate, parentCertificate: Certificate): boolean;
|
|
6
|
-
export type _VerifyStatus = "BadCertificateIssuerUseNotAllowed" | "BadCertificateInvalid" | "Good";
|
|
7
|
-
export declare function verifyCertificateChain(certificateChain: Certificate[]): Promise<{
|
|
8
|
-
status: _VerifyStatus;
|
|
9
|
-
reason: string;
|
|
10
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function buildPublicKey(privateKey: CryptoKey): Promise<CryptoKey>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CertificatePurpose } from "../common.js";
|
|
2
|
-
import { x509 } from "./_crypto.js";
|
|
3
|
-
export declare function getAttributes(purpose: CertificatePurpose): {
|
|
4
|
-
nsComment: string;
|
|
5
|
-
basicConstraints: x509.BasicConstraintsExtension;
|
|
6
|
-
keyUsageExtension: x509.ExtendedKeyUsage[];
|
|
7
|
-
usages: x509.KeyUsageFlags;
|
|
8
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { PrivateKey, KeyObject } from "../common.js";
|
|
3
|
-
export declare function coercePEMorDerToPrivateKey(privateKeyInDerOrPem: string | Buffer): PrivateKey;
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @private
|
|
7
|
-
*/
|
|
8
|
-
export declare function _coercePrivateKey(privateKey: any): Promise<KeyObject>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CertificatePurpose } from "../common.js";
|
|
2
|
-
import { x509 } from "./_crypto.js";
|
|
3
|
-
interface CreateCertificateSigningRequestOptions {
|
|
4
|
-
privateKey: CryptoKey;
|
|
5
|
-
notBefore?: Date;
|
|
6
|
-
notAfter?: Date;
|
|
7
|
-
validity?: number;
|
|
8
|
-
subject?: string;
|
|
9
|
-
dns?: string[];
|
|
10
|
-
ip?: string[];
|
|
11
|
-
applicationUri?: string;
|
|
12
|
-
purpose: CertificatePurpose;
|
|
13
|
-
}
|
|
14
|
-
export declare function createCertificateSigningRequest({ privateKey, subject, dns, ip, applicationUri, purpose, }: CreateCertificateSigningRequestOptions): Promise<{
|
|
15
|
-
csr: string;
|
|
16
|
-
der: x509.Pkcs10CertificateRequest;
|
|
17
|
-
}>;
|
|
18
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare function generateKeyPair(modulusLength?: 1024 | 2048 | 3072 | 4096): Promise<CryptoKeyPair>;
|
|
2
|
-
/**
|
|
3
|
-
* generate a pair of private/public keys of length 1024,2048, 3072, or 4096 bits
|
|
4
|
-
*/
|
|
5
|
-
export declare function generatePrivateKey(modulusLength?: 1024 | 2048 | 3072 | 4096): Promise<CryptoKey>;
|
|
6
|
-
/**
|
|
7
|
-
* convert a CryptoKey to a PEM string
|
|
8
|
-
*/
|
|
9
|
-
export declare function privateKeyToPEM(privateKey: CryptoKey): Promise<{
|
|
10
|
-
privPem: string;
|
|
11
|
-
privDer: ArrayBuffer;
|
|
12
|
-
}>;
|
|
13
|
-
export declare function derToPrivateKey(privDer: ArrayBuffer): Promise<CryptoKey>;
|
|
14
|
-
export declare function pemToPrivateKey(pem: string): Promise<CryptoKey>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CertificatePurpose } from "../common.js";
|
|
2
|
-
import { x509 } from "./_crypto.js";
|
|
3
|
-
export interface CreateSelfSignCertificateOptions {
|
|
4
|
-
privateKey: CryptoKey;
|
|
5
|
-
notBefore?: Date;
|
|
6
|
-
notAfter?: Date;
|
|
7
|
-
validity?: number;
|
|
8
|
-
subject?: string;
|
|
9
|
-
dns?: string[];
|
|
10
|
-
ip?: string[];
|
|
11
|
-
applicationUri?: string;
|
|
12
|
-
purpose: CertificatePurpose;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* construct a self-signed certificate
|
|
17
|
-
*/
|
|
18
|
-
export declare function createSelfSignedCertificate({ privateKey, notAfter, notBefore, validity, subject, dns, ip, applicationUri, purpose, }: CreateSelfSignCertificateOptions): Promise<{
|
|
19
|
-
cert: string;
|
|
20
|
-
der: x509.X509Certificate;
|
|
21
|
-
}>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare function generatePrivateKeyFile(privateKeyFilename: string, modulusLength: 1024 | 2048 | 3072 | 4096): Promise<void>;
|
|
2
|
-
/**
|
|
3
|
-
* alternate function to generate PrivateKeyFile, using jsrsasign.
|
|
4
|
-
*
|
|
5
|
-
* This function is slower than generatePrivateKeyFile
|
|
6
|
-
*/
|
|
7
|
-
export declare function generatePrivateKeyFileAlternate(privateKeyFilename: string, modulusLength: 2048 | 3072 | 4096): Promise<void>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Certificate, CertificatePEM, PublicKey, PublicKeyPEM, PrivateKeyPEM, PrivateKey } from "../source/common.js";
|
|
3
|
-
/**
|
|
4
|
-
* read a DER or PEM certificate from file
|
|
5
|
-
*/
|
|
6
|
-
export declare function readCertificate(filename: string): Certificate;
|
|
7
|
-
/**
|
|
8
|
-
* read a DER or PEM certificate from file
|
|
9
|
-
*/
|
|
10
|
-
export declare function readPublicKey(filename: string): PublicKey;
|
|
11
|
-
export declare function makePrivateKeyThumbPrint(privateKey: PrivateKey): Buffer;
|
|
12
|
-
/**
|
|
13
|
-
* read a DER or PEM certificate from file
|
|
14
|
-
*/
|
|
15
|
-
export declare function readPrivateKey(filename: string): PrivateKey;
|
|
16
|
-
export declare function readCertificatePEM(filename: string): CertificatePEM;
|
|
17
|
-
export declare function readPublicKeyPEM(filename: string): PublicKeyPEM;
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @deprecated
|
|
21
|
-
*/
|
|
22
|
-
export declare function readPrivateKeyPEM(filename: string): PrivateKeyPEM;
|
|
23
|
-
export declare function setCertificateStore(store: string): string;
|
|
24
|
-
export declare function getCertificateStore(): string;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param filename
|
|
28
|
-
*/
|
|
29
|
-
export declare function readPrivateRsaKey(filename: string): PrivateKey;
|
|
30
|
-
export declare function readPublicRsaKey(filename: string): PublicKey;
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|