From 2cec716c48cea816dcd5bf4997ae3cdf1fe4cd90 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Sun, 22 Sep 2024 10:01:20 -0400 Subject: [PATCH] test: update tls test to support OpenSSL32 Refs: https://github.com/nodejs/node/issues/53382 OpenSSL32 does not support AES128 and DH 1024 to update test to use newer algorithms. Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/55030 Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: James M Snell --- .../test-tls-client-getephemeralkeyinfo.js | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-tls-client-getephemeralkeyinfo.js b/test/parallel/test-tls-client-getephemeralkeyinfo.js index 82ed1e27f49..0bacd8702fc 100644 --- a/test/parallel/test-tls-client-getephemeralkeyinfo.js +++ b/test/parallel/test-tls-client-getephemeralkeyinfo.js @@ -67,11 +67,15 @@ function test(size, type, name, cipher) { })); } -test(undefined, undefined, undefined, 'AES128-SHA256'); -test('auto', 'DH', undefined, 'DHE-RSA-AES128-GCM-SHA256'); -test(1024, 'DH', undefined, 'DHE-RSA-AES128-GCM-SHA256'); -test(2048, 'DH', undefined, 'DHE-RSA-AES128-GCM-SHA256'); -test(256, 'ECDH', 'prime256v1', 'ECDHE-RSA-AES128-GCM-SHA256'); -test(521, 'ECDH', 'secp521r1', 'ECDHE-RSA-AES128-GCM-SHA256'); -test(253, 'ECDH', 'X25519', 'ECDHE-RSA-AES128-GCM-SHA256'); -test(448, 'ECDH', 'X448', 'ECDHE-RSA-AES128-GCM-SHA256'); +test(undefined, undefined, undefined, 'AES256-SHA256'); +test('auto', 'DH', undefined, 'DHE-RSA-AES256-GCM-SHA384'); +if (!common.hasOpenSSL(3, 2)) { + test(1024, 'DH', undefined, 'DHE-RSA-AES256-GCM-SHA384'); +} else { + test(3072, 'DH', undefined, 'DHE-RSA-AES256-GCM-SHA384'); +} +test(2048, 'DH', undefined, 'DHE-RSA-AES256-GCM-SHA384'); +test(256, 'ECDH', 'prime256v1', 'ECDHE-RSA-AES256-GCM-SHA384'); +test(521, 'ECDH', 'secp521r1', 'ECDHE-RSA-AES256-GCM-SHA384'); +test(253, 'ECDH', 'X25519', 'ECDHE-RSA-AES256-GCM-SHA384'); +test(448, 'ECDH', 'X448', 'ECDHE-RSA-AES256-GCM-SHA384');