node-opcua-pki
Advanced tools
Comparing version
@@ -87,3 +87,3 @@ "use strict"; | ||
function is_expected_openssl_version(strVersion) { | ||
return !!strVersion.match(/OpenSSL 1.(0|1)./); | ||
return !!strVersion.match(/OpenSSL 1|3/); | ||
} | ||
@@ -90,0 +90,0 @@ function check_system_openssl_version(callback) { |
@@ -366,2 +366,18 @@ "use strict"; | ||
(callback) => createRandomFileIfNotExist(randomFile, {}, callback), | ||
// Note OpenSSL1 generates a -----BEGIN RSA PRIVATE KEY---- whereas | ||
// OpenSSL3 generates a -----BEGIN PRIVATE KEY----- unless the new -traditional option is used | ||
// | ||
// a BEGIN PRIVATE KEY structure is | ||
// | ||
// SEQUENCE (3 elem) | ||
// INTEGER 0 | ||
// SEQUENCE (2 elem) | ||
// OBJECT IDENTIFIER 1.2.840.113549.1.1.1 rsaEncryption (PKCS #1) | ||
// NULL | ||
// OCTET STRING (609 byte) 3082025D02010002818100C5B53231183906122A5E3778736B05C095C75F1BB80D48B | ||
// SEQUENCE (9 elem) | ||
// | ||
// a BEGIN RSA PRIVATE KEY structure is just | ||
// SEQUENCE (9 elem) | ||
// | ||
(callback) => { | ||
@@ -368,0 +384,0 @@ execute_openssl("genrsa " + |
@@ -125,3 +125,3 @@ // --------------------------------------------------------------------------------------------------------------------- | ||
function is_expected_openssl_version(strVersion: string): boolean { | ||
return !!strVersion.match(/OpenSSL 1.(0|1)./); | ||
return !!strVersion.match(/OpenSSL 1|3/); | ||
} | ||
@@ -128,0 +128,0 @@ |
@@ -421,2 +421,18 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
// Note OpenSSL1 generates a -----BEGIN RSA PRIVATE KEY---- whereas | ||
// OpenSSL3 generates a -----BEGIN PRIVATE KEY----- unless the new -traditional option is used | ||
// | ||
// a BEGIN PRIVATE KEY structure is | ||
// | ||
// SEQUENCE (3 elem) | ||
// INTEGER 0 | ||
// SEQUENCE (2 elem) | ||
// OBJECT IDENTIFIER 1.2.840.113549.1.1.1 rsaEncryption (PKCS #1) | ||
// NULL | ||
// OCTET STRING (609 byte) 3082025D02010002818100C5B53231183906122A5E3778736B05C095C75F1BB80D48B | ||
// SEQUENCE (9 elem) | ||
// | ||
// a BEGIN RSA PRIVATE KEY structure is just | ||
// SEQUENCE (9 elem) | ||
// | ||
(callback: ErrorCallback) => { | ||
@@ -423,0 +439,0 @@ execute_openssl( |
{ | ||
"name": "node-opcua-pki", | ||
"version": "2.19.1", | ||
"version": "3.0.0", | ||
"description": "PKI management for node-opcua", | ||
@@ -13,3 +13,3 @@ "main": "./dist/index.js", | ||
"clean": "npx rimraf node_modules .nyc_output tmp private_key.pem certificates", | ||
"test": "npx mocha -t 700000 test/**/*.ts", | ||
"test": "mocha -r ./node_modules/source-map-support/register -t 700000 test/**/*.ts", | ||
"cover": "npx nyc -x bin -x tmp -x lib/misc/install* mocha", | ||
@@ -53,3 +53,3 @@ "cost-of-modules": "npx cost-of-modules --no-install", | ||
"minimist": "^1.2.7", | ||
"node-opcua-crypto": "^1.12.0", | ||
"node-opcua-crypto": "^2.1.0", | ||
"progress": "^2.0.3", | ||
@@ -56,0 +56,0 @@ "rimraf": "^3.0.2", |
@@ -52,8 +52,8 @@ ### node-opcua-pki | ||
| option | description | type | default | | ||
| -------------------------- | --------------------------------------------- | --------- | ------------------------------- | ----- | -------- | --------------- | | ||
| -r, --root | the location of the Certificate folder | [string] | [default: "{CWD}/certificates"] | | ||
| --PKIFolder | the location of the Public Key Infrastructure | [string] | [default: "{root}/PKI"] | | ||
| -k, --keySize, --keyLength | the private key size in bits (1024 | 2048 | 3072 | 4096) | [number] | [default: 2048] | | ||
| -s, --silent | minimize output | [boolean] | [default: false] | | ||
| option | description | type | default | | ||
| -------------------------- | -------------------------------------------------- | --------- | ------------------------------- | | ||
| -r, --root | the location of the Certificate folder | [string] | [default: "{CWD}/certificates"] | | ||
| --PKIFolder | the location of the Public Key Infrastructure | [string] | [default: "{root}/PKI"] | | ||
| -k, --keySize, --keyLength | the private key size in bits (1024,2048,3072,4096) | [number] | [default: 2048] | | ||
| -s, --silent | minimize output | [boolean] | [default: false] | | ||
@@ -82,3 +82,3 @@ The result | ||
| option | description | type | default | | ||
|---------------------|-------------------------------------------------|--------|----------------------------------- -----------| | ||
|---------------------|-------------------------------------------------|--------|-----------------------------------------------| | ||
|-a, --applicationUri |the application URI |[string]|[default: "urn:{hostname}:Node-OPCUA-Server"] | | ||
@@ -99,4 +99,5 @@ |-o, --output | the name of the generated signing_request |[string]|[default: "my_certificate_signing_request.csr"]| | ||
| ` --CAFolder`, `-c` | the location of the Certificate Authority folder | "{root}/CA"] | | ||
| `--keySize`, `-k`, `--keyLength` | the private key size in bits (1024 | 2048 ,3072, 4096 ,2048 | | ||
| `--keySize`, `-k`, `--keyLength` | the private key size in bits (1024, 2048 ,3072, 4096)| | | ||
The result | ||
@@ -186,5 +187,5 @@ | ||
You need to install it on Linux, (or in your docker image), or on MacOS | ||
You need to install it on Linux, (or in your docker image), or on macOS | ||
- on ubuntu/debian: | ||
- on ubuntu/Debian: | ||
@@ -191,0 +192,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
549385
0.28%8742
0.37%215
0.47%+ Added
- Removed
Updated