[PATCH 1/2] test: update error code in tls-psk-circuit for for OpenSSL 3.4
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Tue, 31 Dec 2024 15:44:17 +0000 (16:44 +0100)
committerJérémy Lal <kapouer@melix.org>
Mon, 10 Feb 2025 14:45:36 +0000 (15:45 +0100)
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 <sebastian@breakpoint.cc>
Gbp-Pq: Topic build
Gbp-Pq: Name openssl-3.4-test-tls-psk-circuit.patch

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

index e93db3eb1b4923d96b491dd96cbd2cf7b57d58cf..a63603bfcbbc2dd74441d893bbfc640c5e6b2081 100644 (file)
@@ -66,7 +66,7 @@ const expectedHandshakeErr = common.hasOpenSSL(3, 2) ?
   '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.hasOpenSSL(3, 2) ?
+const expectedIllegalParameterErr = common.hasOpenSSL(3, 4) ? 'ERR_SSL_TLSV1_ALERT_DECRYPT_ERROR' : common.hasOpenSSL(3, 2) ?
   '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' });