From: Sebastian Andrzej Siewior Date: Tue, 31 Dec 2024 15:44:17 +0000 (+0100) Subject: [PATCH 1/2] test: update error code in tls-psk-circuit for for OpenSSL 3.4 X-Git-Tag: archive/raspbian/20.18.3+dfsg-1+rpi1^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c85b31543d9b4c89fa08ff89df4444600d6c5996;p=nodejs.git [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 --- 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' });