@superhero/eventflow-certificates 4.0.6 → 4.3.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/index.js +7 -7
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -208,7 +208,7 @@ export default class Certificates
|
|
|
208
208
|
{
|
|
209
209
|
return this.openSSL.root(
|
|
210
210
|
{
|
|
211
|
-
days : this.config.CERT_ROOT_DAYS,
|
|
211
|
+
days : Number(this.config.CERT_ROOT_DAYS),
|
|
212
212
|
algorithm : this.config.CERT_ALGORITHM,
|
|
213
213
|
hash : this.config.CERT_HASH,
|
|
214
214
|
subject : { UID },
|
|
@@ -221,7 +221,7 @@ export default class Certificates
|
|
|
221
221
|
const root = await this.root
|
|
222
222
|
return await this.openSSL.intermediate(root,
|
|
223
223
|
{
|
|
224
|
-
days : this.config.CERT_INTERMEDIATE_DAYS,
|
|
224
|
+
days : Number(this.config.CERT_INTERMEDIATE_DAYS),
|
|
225
225
|
algorithm : this.config.CERT_ALGORITHM,
|
|
226
226
|
hash : this.config.CERT_HASH,
|
|
227
227
|
dns : [ '.' + UID ],
|
|
@@ -239,7 +239,7 @@ export default class Certificates
|
|
|
239
239
|
const ica = await this.intermediate
|
|
240
240
|
return await this.openSSL.leaf(ica,
|
|
241
241
|
{
|
|
242
|
-
days : this.config.CERT_LEAF_DAYS,
|
|
242
|
+
days : Number(this.config.CERT_LEAF_DAYS),
|
|
243
243
|
algorithm : this.config.CERT_ALGORITHM,
|
|
244
244
|
hash : this.config.CERT_HASH,
|
|
245
245
|
dns : [ this.leafUID ],
|
|
@@ -257,8 +257,8 @@ export default class Certificates
|
|
|
257
257
|
const
|
|
258
258
|
cipher = this.config.CERT_PASS_CIPHER,
|
|
259
259
|
hash = this.config.CERT_PASS_PBKDF2_HASH,
|
|
260
|
-
bytes = this.config.CERT_PASS_PBKDF2_BYTES,
|
|
261
|
-
iterations = this.config.CERT_PASS_PBKDF2_ITERATIONS,
|
|
260
|
+
bytes = Number(this.config.CERT_PASS_PBKDF2_BYTES),
|
|
261
|
+
iterations = Number(this.config.CERT_PASS_PBKDF2_ITERATIONS),
|
|
262
262
|
salt = crypto.randomBytes(16),
|
|
263
263
|
iv = crypto.randomBytes(16),
|
|
264
264
|
key = crypto.pbkdf2Sync(password, salt, iterations, bytes, hash), // derive key
|
|
@@ -274,8 +274,8 @@ export default class Certificates
|
|
|
274
274
|
const
|
|
275
275
|
cipher = this.config.CERT_PASS_CIPHER,
|
|
276
276
|
hash = this.config.CERT_PASS_PBKDF2_HASH,
|
|
277
|
-
bytes = this.config.CERT_PASS_PBKDF2_BYTES,
|
|
278
|
-
iterations = this.config.CERT_PASS_PBKDF2_ITERATIONS,
|
|
277
|
+
bytes = Number(this.config.CERT_PASS_PBKDF2_BYTES),
|
|
278
|
+
iterations = Number(this.config.CERT_PASS_PBKDF2_ITERATIONS),
|
|
279
279
|
key = crypto.pbkdf2Sync(password, salt, iterations, bytes, hash),
|
|
280
280
|
decipher = crypto.createDecipheriv(cipher, key, iv)
|
|
281
281
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superhero/eventflow-certificates",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Eventflow certificates is common tls certificates logic used in the eventflow ecosystem.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eventflow"
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@superhero/log": "^4.0.1",
|
|
15
|
-
"@superhero/openssl": "^4.0.
|
|
15
|
+
"@superhero/openssl": "^4.0.3",
|
|
16
16
|
"@superhero/deep": "^4.2.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@superhero/eventflow-db": "^4.
|
|
20
|
-
"@superhero/locator": "^4.2.
|
|
19
|
+
"@superhero/eventflow-db": "^4.3.0",
|
|
20
|
+
"@superhero/locator": "^4.2.5"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test-build": "npm explore @superhero/eventflow-db -- npm run test-build",
|