GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: forward new SecureContext options · nodejs/node@08ed233

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _tls_wrap.js
    • https.js
  • test/parallel
    • test-https-agent-getname.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,9 @@ Server.prototype.setSecureContext = function(options) {
13201320
if (options.ticketKeys)
13211321
this.ticketKeys = options.ticketKeys;
13221322

1323+
this.privateKeyIdentifier = options.privateKeyIdentifier;
1324+
this.privateKeyEngine = options.privateKeyEngine;
1325+
13231326
this._sharedCreds = tls.createSecureContext({
13241327
pfx: this.pfx,
13251328
key: this.key,
@@ -1339,7 +1342,9 @@ Server.prototype.setSecureContext = function(options) {
13391342
crl: this.crl,
13401343
sessionIdContext: this.sessionIdContext,
13411344
ticketKeys: this.ticketKeys,
1342-
sessionTimeout: this.sessionTimeout
1345+
sessionTimeout: this.sessionTimeout,
1346+
privateKeyIdentifier: this.privateKeyIdentifier,
1347+
privateKeyEngine: this.privateKeyEngine,
13431348
});
13441349
};
13451350

@@ -1405,6 +1410,11 @@ Server.prototype.setOptions = deprecate(function(options) {
14051410
}
14061411
if (options.pskCallback) this[kPskCallback] = options.pskCallback;
14071412
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;
14081418
}, 'Server.prototype.setOptions() is deprecated', 'DEP0122');
14091419

14101420
// SNI Contexts High-Level API
Collapse file

‎lib/https.js‎

Copy file name to clipboardExpand all lines: lib/https.js
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
const {
2525
ObjectAssign,
2626
ObjectSetPrototypeOf,
27+
JSONStringify,
2728
} = primordials;
2829

2930
require('internal/util').assertCrypto();
@@ -236,6 +237,18 @@ Agent.prototype.getName = function getName(options) {
236237
if (options.sessionIdContext)
237238
name += options.sessionIdContext;
238239

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+
239252
return name;
240253
};
241254

Collapse file

‎test/parallel/test-https-agent-getname.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-https-agent-getname.js
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const agent = new https.Agent();
1212
// empty options
1313
assert.strictEqual(
1414
agent.getName({}),
15-
'localhost:::::::::::::::::::'
15+
'localhost::::::::::::::::::::::'
1616
);
1717

1818
// Pass all options arguments
@@ -34,11 +34,15 @@ const options = {
3434
secureOptions: 0,
3535
secureProtocol: 'secureProtocol',
3636
servername: 'localhost',
37-
sessionIdContext: 'sessionIdContext'
37+
sessionIdContext: 'sessionIdContext',
38+
sigalgs: 'sigalgs',
39+
privateKeyIdentifier: 'privateKeyIdentifier',
40+
privateKeyEngine: 'privateKeyEngine',
3841
};
3942

4043
assert.strictEqual(
4144
agent.getName(options),
4245
'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'
4448
);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.