From 2cfe690af6b20880b49f07f81a9e955bf5fd4920 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 30 Aug 2024 16:40:08 +0100 Subject: [PATCH] test: update TLS test for OpenSSL 3.2 Update `parallel/test-tls-set-sigalgs` to account for error code changes in OpenSSL 3.2 and later. PR-URL: https://github.com/nodejs/node/pull/54612 Refs: https://github.com/nodejs/node/pull/53384 Reviewed-By: Filip Skokan Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli --- test/parallel/test-tls-set-sigalgs.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-tls-set-sigalgs.js b/test/parallel/test-tls-set-sigalgs.js index ffe950a0d21f86..3f3d152f4d877e 100644 --- a/test/parallel/test-tls-set-sigalgs.js +++ b/test/parallel/test-tls-set-sigalgs.js @@ -63,10 +63,12 @@ test('RSA-PSS+SHA256:RSA-PSS+SHA512:ECDSA+SHA256', ['RSA-PSS+SHA256', 'ECDSA+SHA256']); // Do not have shared sigalgs. +const handshakeErr = common.hasOpenSSL(3, 2) ? + 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'; test('RSA-PSS+SHA384', 'ECDSA+SHA256', - undefined, 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE', + undefined, handshakeErr, 'ERR_SSL_NO_SHARED_SIGNATURE_ALGORITHMS'); test('RSA-PSS+SHA384:ECDSA+SHA256', 'ECDSA+SHA384:RSA-PSS+SHA256', - undefined, 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE', + undefined, handshakeErr, 'ERR_SSL_NO_SHARED_SIGNATURE_ALGORITHMS');