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: deflake test-tls-resume-servername · nodejs/node@fb4695a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-tls-resume-servername.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-tls-resume-servername.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-resume-servername.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ server.listen(0, common.mustCall(async () => {
8282
// TLS1.3 PSK works by pretending to be resumption (but it's not).
8383
const secret = Buffer.alloc(32, 1);
8484
const ciphers = 'TLS_AES_128_GCM_SHA256';
85-
const psk = tls.createServer({ ciphers, pskCallback: () => secret },
85+
// OpenSSL offers resumption tickets to pskCallback as identities too (cut
86+
// at their first NUL byte). Answering those would turn a ticket into an
87+
// external PSK whose binder can't verify, so only answer for 'client'.
88+
const pskCallback = (socket, identity) => (identity === 'client' ? secret : undefined);
89+
const psk = tls.createServer({ ciphers, pskCallback },
8690
common.mustCall((socket) => {
8791
assert.strictEqual(socket.servername, 'psk.example');
8892
socket.end();

0 commit comments

Comments
0 (0)
You are visitor 01402775 — 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.