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: fix test-tls-junk-closes-server · nodejs/node@7802170

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-tls-junk-closes-server.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-tls-junk-closes-server.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-junk-closes-server.js
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ const server = tls.createServer(options, common.mustNotCall());
3939
server.listen(0, common.mustCall(function() {
4040
const c = net.createConnection(this.address().port);
4141

42+
c.on('data', function() {
43+
// We must consume all data sent by the server. Otherwise the
44+
// end event will not be sent and the test will hang.
45+
// For example, when compiled with OpenSSL32 we see the
46+
// following response '15 03 03 00 02 02 16' which
47+
// decodes as a fatal (0x02) TLS error alert number 22 (0x16),
48+
// which corresponds to TLS1_AD_RECORD_OVERFLOW which matches
49+
// the error we see if NODE_DEBUG is turned on.
50+
// Some earlier OpenSSL versions did not seem to send a response
51+
// but the TLS spec seems to indicate there should be one
52+
// https://datatracker.ietf.org/doc/html/rfc8446#page-85
53+
// and error handling seems to have been re-written/improved
54+
// in OpenSSL32. Consuming the data allows the test to pass
55+
// either way.
56+
});
57+
4258
c.on('connect', common.mustCall(function() {
4359
c.write('blah\nblah\nblah\n');
4460
}));

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.