From a4a6ef8d2913043465fef3144a41a59ed4a1c0e0 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 28 Aug 2024 14:58:09 +0000 Subject: [PATCH] test: fix test-tls-client-auth test for OpenSSL32 Refs: https://github.com/nodejs/node/issues/53382 Refs: https://github.com/nodejs/node/pull/53384 Same change as in 53384 where OpenSSL32 returns a slightly different error but for a different test. Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/54610 Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca --- test/parallel/test-tls-client-auth.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-tls-client-auth.js b/test/parallel/test-tls-client-auth.js index 04756924e5e0e6..de4c8f038ec073 100644 --- a/test/parallel/test-tls-client-auth.js +++ b/test/parallel/test-tls-client-auth.js @@ -79,8 +79,10 @@ connect({ }, function(err, pair, cleanup) { assert.strictEqual(pair.server.err.code, 'ERR_SSL_PEER_DID_NOT_RETURN_A_CERTIFICATE'); + const expectedErr = common.hasOpenSSL(3, 2) ? + 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'; assert.strictEqual(pair.client.err.code, - 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'); + expectedErr); return cleanup(); });