| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 30fe0ff commit 58319d5
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1330,6 +1330,9 @@ Server.prototype.setSecureContext = function(options) { | |||
| 1330 | 1330 | if (options.ticketKeys) | |
| 1331 | 1331 | this.ticketKeys = options.ticketKeys; | |
| 1332 | 1332 | ||
| 1333 | + this.privateKeyIdentifier = options.privateKeyIdentifier; | ||
| 1334 | + this.privateKeyEngine = options.privateKeyEngine; | ||
| 1335 | + | ||
| 1333 | 1336 | this._sharedCreds = tls.createSecureContext({ | |
| 1334 | 1337 | pfx: this.pfx, | |
| 1335 | 1338 | key: this.key, | |
@@ -1349,7 +1352,9 @@ Server.prototype.setSecureContext = function(options) { | |||
| 1349 | 1352 | crl: this.crl, | |
| 1350 | 1353 | sessionIdContext: this.sessionIdContext, | |
| 1351 | 1354 | ticketKeys: this.ticketKeys, | |
| 1352 | - sessionTimeout: this.sessionTimeout | ||
| 1355 | + sessionTimeout: this.sessionTimeout, | ||
| 1356 | + privateKeyIdentifier: this.privateKeyIdentifier, | ||
| 1357 | + privateKeyEngine: this.privateKeyEngine, | ||
| 1353 | 1358 | }); | |
| 1354 | 1359 | }; | |
| 1355 | 1360 | ||
@@ -1415,6 +1420,11 @@ Server.prototype.setOptions = deprecate(function(options) { | |||
| 1415 | 1420 | } | |
| 1416 | 1421 | if (options.pskCallback) this[kPskCallback] = options.pskCallback; | |
| 1417 | 1422 | if (options.pskIdentityHint) this[kPskIdentityHint] = options.pskIdentityHint; | |
| 1423 | + if (options.sigalgs) this.sigalgs = options.sigalgs; | ||
| 1424 | + if (options.privateKeyIdentifier !== undefined) | ||
| 1425 | + this.privateKeyIdentifier = options.privateKeyIdentifier; | ||
| 1426 | + if (options.privateKeyEngine !== undefined) | ||
| 1427 | + this.privateKeyEngine = options.privateKeyEngine; | ||
| 1418 | 1428 | }, 'Server.prototype.setOptions() is deprecated', 'DEP0122'); | |
| 1419 | 1429 | ||
| 1420 | 1430 | // SNI Contexts High-Level API | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,6 +24,7 @@ | |||
| 24 | 24 | const { | |
| 25 | 25 | ObjectAssign, | |
| 26 | 26 | ObjectSetPrototypeOf, | |
| 27 | + JSONStringify, | ||
| 27 | 28 | } = primordials; | |
| 28 | 29 | ||
| 29 | 30 | require('internal/util').assertCrypto(); | |
@@ -236,6 +237,18 @@ Agent.prototype.getName = function getName(options) { | |||
| 236 | 237 | if (options.sessionIdContext) | |
| 237 | 238 | name += options.sessionIdContext; | |
| 238 | 239 | ||
| 240 | + name += ':'; | ||
| 241 | + if (options.sigalgs) | ||
| 242 | + name += JSONStringify(options.sigalgs); | ||
| 243 | + | ||
| 244 | + name += ':'; | ||
| 245 | + if (options.privateKeyIdentifier) | ||
| 246 | + name += options.privateKeyIdentifier; | ||
| 247 | + | ||
| 248 | + name += ':'; | ||
| 249 | + if (options.privateKeyEngine) | ||
| 250 | + name += options.privateKeyEngine; | ||
| 251 | + | ||
| 239 | 252 | return name; | |
| 240 | 253 | }; | |
| 241 | 254 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ const agent = new https.Agent(); | |||
| 12 | 12 | // empty options | |
| 13 | 13 | assert.strictEqual( | |
| 14 | 14 | agent.getName({}), | |
| 15 | - 'localhost:::::::::::::::::::' | ||
| 15 | + 'localhost::::::::::::::::::::::' | ||
| 16 | 16 | ); | |
| 17 | 17 | ||
| 18 | 18 | // Pass all options arguments | |
@@ -34,11 +34,15 @@ const options = { | |||
| 34 | 34 | secureOptions: 0, | |
| 35 | 35 | secureProtocol: 'secureProtocol', | |
| 36 | 36 | servername: 'localhost', | |
| 37 | - sessionIdContext: 'sessionIdContext' | ||
| 37 | + sessionIdContext: 'sessionIdContext', | ||
| 38 | + sigalgs: 'sigalgs', | ||
| 39 | + privateKeyIdentifier: 'privateKeyIdentifier', | ||
| 40 | + privateKeyEngine: 'privateKeyEngine', | ||
| 38 | 41 | }; | |
| 39 | 42 | ||
| 40 | 43 | assert.strictEqual( | |
| 41 | 44 | agent.getName(options), | |
| 42 | 45 | '0.0.0.0:443:192.168.1.1:ca:cert:dynamic:ciphers:key:pfx:false:localhost:' + | |
| 43 | - '::secureProtocol:c,r,l:false:ecdhCurve:dhparam:0:sessionIdContext' | ||
| 46 | + '::secureProtocol:c,r,l:false:ecdhCurve:dhparam:0:sessionIdContext:' + | ||
| 47 | + '"sigalgs":privateKeyIdentifier:privateKeyEngine' | ||
| 44 | 48 | ); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments