@superhero/eventflow-hub 4.8.2 → 4.8.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/index.js +14 -19
  3. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ---
2
+ #### v4.8.3
3
+ ---
4
+
5
+ ...
6
+
1
7
  ---
2
8
  #### v4.8.2
3
9
  ---\n\nVersion alignment...
package/index.js CHANGED
@@ -122,18 +122,15 @@ export default class Hub
122
122
 
123
123
  try
124
124
  {
125
- const
126
- root = await this.certificates.root,
127
- ica = await this.certificates.intermediate,
128
- leaf = await this.certificates.leaf
129
-
130
- const ctx = tls.createSecureContext(
131
- {
132
- ca : root.cert,
133
- cert : leaf.cert + ica.cert,
134
- key : leaf.key,
135
- passphrase : leaf.pass
136
- })
125
+ const
126
+ chain = await this.certificates.getChain(),
127
+ ctx = tls.createSecureContext(
128
+ {
129
+ ca : chain.root.cert,
130
+ cert : chain.leaf.cert + chain.intermediate.cert,
131
+ key : chain.leaf.key,
132
+ passphrase : chain.leaf.pass
133
+ })
137
134
 
138
135
  cb(null, ctx)
139
136
  }
@@ -336,13 +333,11 @@ export default class Hub
336
333
  async #transmitHubOnlineToPeerHub(servername, host, port)
337
334
  {
338
335
  const
339
- rootCA = await this.certificates.root,
340
- hubICA = await this.certificates.intermediate,
341
- hubLeaf = await this.certificates.leaf,
342
- ca = rootCA.cert,
343
- cert = hubLeaf.cert + hubICA.cert,
344
- key = hubLeaf.key,
345
- passphrase = hubLeaf.pass,
336
+ chain = await this.certificates.getChain(),
337
+ ca = chain.root.cert,
338
+ cert = chain.leaf.cert + chain.intermediate.cert,
339
+ key = chain.leaf.key,
340
+ passphrase = chain.leaf.pass,
346
341
  timeout = Number(this.config.PEER_HUB_ONLINE_TIMEOUT),
347
342
  dynamicConfig = { servername, host, port, ca, cert, key, passphrase, timeout },
348
343
  peerHubConfig = deepmerge(dynamicConfig, this.config.TCP_SOCKET_CLIENT_OPTIONS),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-hub",
3
- "version": "4.8.2",
3
+ "version": "4.8.3",
4
4
  "description": "Eventflow hub is the central server component in the eventflow ecosystem.",
5
5
  "keywords": [
6
6
  "eventflow",
@@ -21,17 +21,17 @@
21
21
  "test": "syntax-check; node --test --test-reporter=@superhero/audit/reporter --experimental-test-coverage"
22
22
  },
23
23
  "dependencies": {
24
- "@superhero/id-name-generator": "4.8.2",
25
- "@superhero/log": "4.8.2",
26
- "@superhero/eventflow-certificates": "4.8.2",
27
- "@superhero/eventflow-db": "4.8.2",
28
- "@superhero/tcp-record-channel": "4.8.2",
29
- "@superhero/deep": "4.8.2"
24
+ "@superhero/id-name-generator": "4.8.3",
25
+ "@superhero/log": "4.8.3",
26
+ "@superhero/eventflow-certificates": "4.8.3",
27
+ "@superhero/eventflow-db": "4.8.3",
28
+ "@superhero/tcp-record-channel": "4.8.3",
29
+ "@superhero/deep": "4.8.3"
30
30
  },
31
31
  "devDependencies": {
32
- "@superhero/audit": "4.8.2",
32
+ "@superhero/audit": "4.8.3",
33
33
  "@superhero/syntax-check": "0.0.2",
34
- "@superhero/locator": "4.8.2"
34
+ "@superhero/locator": "4.8.3"
35
35
  },
36
36
  "author": {
37
37
  "name": "Erik Landvall",