| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3701e5d commit 08ed233
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1320,6 +1320,9 @@ Server.prototype.setSecureContext = function(options) { | |||
| 1320 | 1320 | if (options.ticketKeys) | |
| 1321 | 1321 | this.ticketKeys = options.ticketKeys; | |
| 1322 | 1322 | ||
| 1323 | + this.privateKeyIdentifier = options.privateKeyIdentifier; | ||
| 1324 | + this.privateKeyEngine = options.privateKeyEngine; | ||
| 1325 | + | ||
| 1323 | 1326 | this._sharedCreds = tls.createSecureContext({ | |
| 1324 | 1327 | pfx: this.pfx, | |
| 1325 | 1328 | key: this.key, | |
@@ -1339,7 +1342,9 @@ Server.prototype.setSecureContext = function(options) { | |||
| 1339 | 1342 | crl: this.crl, | |
| 1340 | 1343 | sessionIdContext: this.sessionIdContext, | |
| 1341 | 1344 | ticketKeys: this.ticketKeys, | |
| 1342 | - sessionTimeout: this.sessionTimeout | ||
| 1345 | + sessionTimeout: this.sessionTimeout, | ||
| 1346 | + privateKeyIdentifier: this.privateKeyIdentifier, | ||
| 1347 | + privateKeyEngine: this.privateKeyEngine, | ||
| 1343 | 1348 | }); | |
| 1344 | 1349 | }; | |
| 1345 | 1350 | ||
@@ -1405,6 +1410,11 @@ Server.prototype.setOptions = deprecate(function(options) { | |||
| 1405 | 1410 | } | |
| 1406 | 1411 | if (options.pskCallback) this[kPskCallback] = options.pskCallback; | |
| 1407 | 1412 | if (options.pskIdentityHint) this[kPskIdentityHint] = options.pskIdentityHint; | |
| 1413 | + if (options.sigalgs) this.sigalgs = options.sigalgs; | ||
| 1414 | + if (options.privateKeyIdentifier !== undefined) | ||
| 1415 | + this.privateKeyIdentifier = options.privateKeyIdentifier; | ||
| 1416 | + if (options.privateKeyEngine !== undefined) | ||
| 1417 | + this.privateKeyEngine = options.privateKeyEngine; | ||
| 1408 | 1418 | }, 'Server.prototype.setOptions() is deprecated', 'DEP0122'); | |
| 1409 | 1419 | ||
| 1410 | 1420 | // 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