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 — test: minor refactoring of onticketkeycallback · nodejs/node@026e03c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-https-resume-after-renew.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-https-resume-after-renew.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-https-resume-after-renew.js
+5-8Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ const hmac = Buffer.alloc(16, 'H');
2222

2323
server._sharedCreds.context.enableTicketKeyCallback();
2424
server._sharedCreds.context.onticketkeycallback = function(name, iv, enc) {
25-
let newName, newIV;
2625
if (enc) {
27-
newName = Buffer.alloc(16, 'A');
28-
newIV = crypto.randomBytes(16);
29-
} else {
30-
// Renew
31-
return [ 2, hmac, aes ];
26+
const newName = Buffer.alloc(16, 'A');
27+
const newIV = crypto.randomBytes(16);
28+
return [ 1, hmac, aes, newName, newIV ];
3229
}
33-
34-
return [ 1, hmac, aes, newName, newIV ];
30+
// Renew
31+
return [ 2, hmac, aes ];
3532
};
3633

3734
server.listen(0, function() {

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.