From c85b31543d9b4c89fa08ff89df4444600d6c5996 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 31 Dec 2024 16:44:17 +0100 Subject: [PATCH] [PATCH 1/2] test: update error code in tls-psk-circuit for for OpenSSL 3.4 Update parallel/test-tls-psk-circuit.js to account for error code changes in OpenSSL 3.4 and probably later. https://github.com/nodejs/node/pull/56420 Signed-off-by: Sebastian Andrzej Siewior Gbp-Pq: Topic build Gbp-Pq: Name openssl-3.4-test-tls-psk-circuit.patch --- test/common/index.js | 4 ++++ test/parallel/test-tls-psk-circuit.js | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/common/index.js b/test/common/index.js index dd8e3cedb..7c062109a 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -1021,6 +1021,10 @@ const common = { return hasOpenSSL(3, 2); }, + get hasOpenSSL34() { + return hasOpenSSL(3, 4); + }, + get inFreeBSDJail() { if (inFreeBSDJail !== null) return inFreeBSDJail; diff --git a/test/parallel/test-tls-psk-circuit.js b/test/parallel/test-tls-psk-circuit.js index 2b49161df..491eaecd4 100644 --- a/test/parallel/test-tls-psk-circuit.js +++ b/test/parallel/test-tls-psk-circuit.js @@ -66,7 +66,8 @@ const expectedHandshakeErr = common.hasOpenSSL32 ? 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'; test({ psk: USERS.UserB, identity: 'UserC' }, {}, expectedHandshakeErr); // Recognized user but incorrect secret should fail handshake -const expectedIllegalParameterErr = common.hasOpenSSL32 ? - 'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER' : 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER'; +const expectedIllegalParameterErr = common.hasOpenSSL34 ? 'ERR_SSL_TLSV1_ALERT_DECRYPT_ERROR' : + common.hasOpenSSL32 ? + 'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER' : 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER'; test({ psk: USERS.UserA, identity: 'UserB' }, {}, expectedIllegalParameterErr); test({ psk: USERS.UserB, identity: 'UserB' }); -- 2.30.2