Skip to content

Commit 1f11d68

Browse files
mhdawsontargos
authored andcommitted
test: adjust key sizes to support OpenSSL32
Refs: #53382 This test fails on OpenSSL32 because it complains the key being used is too short. Adjust the key sizes so that they will pass on OpenSSL32 in addition to other OpenSSL3 versions. Since the keys are not public key related I don't think the increase in key size will be too bad in terms of performance so I've just increased versus guarding for OpenSSL32 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #54972 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d109f1c commit 1f11d68

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/parallel/test-tls-getcipher.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
4747
tls.connect({
4848
host: '127.0.0.1',
4949
port: this.address().port,
50-
ciphers: 'AES128-SHA256',
50+
ciphers: 'AES256-SHA256',
5151
rejectUnauthorized: false,
5252
maxVersion: 'TLSv1.2',
5353
}, common.mustCall(function() {
5454
const cipher = this.getCipher();
55-
assert.strictEqual(cipher.name, 'AES128-SHA256');
56-
assert.strictEqual(cipher.standardName, 'TLS_RSA_WITH_AES_128_CBC_SHA256');
55+
assert.strictEqual(cipher.name, 'AES256-SHA256');
56+
assert.strictEqual(cipher.standardName, 'TLS_RSA_WITH_AES_256_CBC_SHA256');
5757
assert.strictEqual(cipher.version, 'TLSv1.2');
5858
this.end();
5959
}));
@@ -62,14 +62,14 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
6262
tls.connect({
6363
host: '127.0.0.1',
6464
port: this.address().port,
65-
ciphers: 'ECDHE-RSA-AES128-GCM-SHA256',
65+
ciphers: 'ECDHE-RSA-AES256-GCM-SHA384',
6666
rejectUnauthorized: false,
6767
maxVersion: 'TLSv1.2',
6868
}, common.mustCall(function() {
6969
const cipher = this.getCipher();
70-
assert.strictEqual(cipher.name, 'ECDHE-RSA-AES128-GCM-SHA256');
70+
assert.strictEqual(cipher.name, 'ECDHE-RSA-AES256-GCM-SHA384');
7171
assert.strictEqual(cipher.standardName,
72-
'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256');
72+
'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384');
7373
assert.strictEqual(cipher.version, 'TLSv1.2');
7474
this.end();
7575
}));
@@ -78,19 +78,19 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
7878
tls.createServer({
7979
key: fixtures.readKey('agent2-key.pem'),
8080
cert: fixtures.readKey('agent2-cert.pem'),
81-
ciphers: 'TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_CCM_8_SHA256',
81+
ciphers: 'TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384',
8282
maxVersion: 'TLSv1.3',
8383
}, common.mustCall(function() {
8484
this.close();
8585
})).listen(0, common.mustCall(function() {
8686
const client = tls.connect({
8787
port: this.address().port,
88-
ciphers: 'TLS_AES_128_CCM_8_SHA256',
88+
ciphers: 'TLS_AES_256_GCM_SHA384',
8989
maxVersion: 'TLSv1.3',
9090
rejectUnauthorized: false
9191
}, common.mustCall(() => {
9292
const cipher = client.getCipher();
93-
assert.strictEqual(cipher.name, 'TLS_AES_128_CCM_8_SHA256');
93+
assert.strictEqual(cipher.name, 'TLS_AES_256_GCM_SHA384');
9494
assert.strictEqual(cipher.standardName, cipher.name);
9595
assert.strictEqual(cipher.version, 'TLSv1.3');
9696
client.end();

0 commit comments

Comments
 (0)