test: update TLS tests for OpenSSL 3.2 · nodejs/node@7349edb · GitHub
Skip to content

Commit 7349edb

Browse files
richardlautargos
authored andcommitted
test: update TLS tests for OpenSSL 3.2
Update the following TLS tests to account for error code changes in OpenSSL 3.2 and later. - `parallel/test-tls-empty-sni-context` - `parallel/test-tls-psk-circuit` PR-URL: #53384 Refs: #53382 Refs: openssl/openssl#19950 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
1 parent 0b9191d commit 7349edb

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

test/common/index.js

Lines changed: 4 additions & 0 deletions

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

Lines 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
}));

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

Lines changed: 6 additions & 4 deletions

0 commit comments

Comments
 (0)