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: update TLS tests for OpenSSL 3.2 · nodejs/node@fc43c68

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • common
      • index.js
    • parallel
      • test-tls-empty-sni-context.js
      • test-tls-psk-circuit.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/common/index.js‎

Copy file name to clipboardExpand all lines: test/common/index.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ const hasOpenSSL3 = hasCrypto &&
6161
const hasOpenSSL31 = hasCrypto &&
6262
require('crypto').constants.OPENSSL_VERSION_NUMBER >= 0x30100000;
6363

64+
const hasOpenSSL32 = hasCrypto &&
65+
require('crypto').constants.OPENSSL_VERSION_NUMBER >= 0x30200000;
66+
6467
const hasQuic = hasCrypto && !!process.config.variables.openssl_quic;
6568

6669
function parseTestFlags(filename = process.argv[1]) {
@@ -902,6 +905,7 @@ const common = {
902905
hasCrypto,
903906
hasOpenSSL3,
904907
hasOpenSSL31,
908+
hasOpenSSL32,
905909
hasQuic,
906910
hasMultiLocalhost,
907911
invalidArgTypeHelper,
Collapse file

‎test/parallel/test-tls-empty-sni-context.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-empty-sni-context.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const server = tls.createServer(options, (c) => {
2626
}, common.mustNotCall());
2727

2828
c.on('error', common.mustCall((err) => {
29-
assert.strictEqual(err.code, 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE');
29+
const expectedErr = common.hasOpenSSL32 ?
30+
'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE';
31+
assert.strictEqual(err.code, expectedErr);
3032
}));
3133
}));
Collapse file

‎test/parallel/test-tls-psk-circuit.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-psk-circuit.js
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ test({ psk: USERS.UserA, identity: 'UserA' }, { minVersion: 'TLSv1.3' });
6262
test({ psk: USERS.UserB, identity: 'UserB' });
6363
test({ psk: USERS.UserB, identity: 'UserB' }, { minVersion: 'TLSv1.3' });
6464
// Unrecognized user should fail handshake
65-
test({ psk: USERS.UserB, identity: 'UserC' }, {},
66-
'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE');
65+
const expectedHandshakeErr = common.hasOpenSSL32 ?
66+
'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE';
67+
test({ psk: USERS.UserB, identity: 'UserC' }, {}, expectedHandshakeErr);
6768
// Recognized user but incorrect secret should fail handshake
68-
test({ psk: USERS.UserA, identity: 'UserB' }, {},
69-
'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER');
69+
const expectedIllegalParameterErr = common.hasOpenSSL32 ?
70+
'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER' : 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER';
71+
test({ psk: USERS.UserA, identity: 'UserB' }, {}, expectedIllegalParameterErr);
7072
test({ psk: USERS.UserB, identity: 'UserB' });

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.