Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: adjust key sizes to support OpenSSL32 #54972

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
  • Loading branch information
mhdawson committed Sep 16, 2024
commit 144158e6a922f96bcea9c46a42c24208e0cc1a7a
18 changes: 9 additions & 9 deletions test/parallel/test-tls-getcipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
tls.connect({
host: '127.0.0.1',
port: this.address().port,
ciphers: 'AES128-SHA256',
ciphers: 'AES256-SHA256',
rejectUnauthorized: false,
maxVersion: 'TLSv1.2',
}, common.mustCall(function() {
const cipher = this.getCipher();
assert.strictEqual(cipher.name, 'AES128-SHA256');
assert.strictEqual(cipher.standardName, 'TLS_RSA_WITH_AES_128_CBC_SHA256');
assert.strictEqual(cipher.name, 'AES256-SHA256');
assert.strictEqual(cipher.standardName, 'TLS_RSA_WITH_AES_256_CBC_SHA256');
assert.strictEqual(cipher.version, 'TLSv1.2');
this.end();
}));
Expand All @@ -62,14 +62,14 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
tls.connect({
host: '127.0.0.1',
port: this.address().port,
ciphers: 'ECDHE-RSA-AES128-GCM-SHA256',
ciphers: 'ECDHE-RSA-AES256-GCM-SHA384',
rejectUnauthorized: false,
maxVersion: 'TLSv1.2',
}, common.mustCall(function() {
const cipher = this.getCipher();
assert.strictEqual(cipher.name, 'ECDHE-RSA-AES128-GCM-SHA256');
assert.strictEqual(cipher.name, 'ECDHE-RSA-AES256-GCM-SHA384');
assert.strictEqual(cipher.standardName,
'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256');
'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384');
assert.strictEqual(cipher.version, 'TLSv1.2');
this.end();
}));
Expand All @@ -78,19 +78,19 @@ server.listen(0, '127.0.0.1', common.mustCall(function() {
tls.createServer({
key: fixtures.readKey('agent2-key.pem'),
cert: fixtures.readKey('agent2-cert.pem'),
ciphers: 'TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_CCM_8_SHA256',
ciphers: 'TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384',
maxVersion: 'TLSv1.3',
}, common.mustCall(function() {
this.close();
})).listen(0, common.mustCall(function() {
const client = tls.connect({
port: this.address().port,
ciphers: 'TLS_AES_128_CCM_8_SHA256',
ciphers: 'TLS_AES_256_GCM_SHA384',
maxVersion: 'TLSv1.3',
rejectUnauthorized: false
}, common.mustCall(() => {
const cipher = client.getCipher();
assert.strictEqual(cipher.name, 'TLS_AES_128_CCM_8_SHA256');
assert.strictEqual(cipher.name, 'TLS_AES_256_GCM_SHA384');
assert.strictEqual(cipher.standardName, cipher.name);
assert.strictEqual(cipher.version, 'TLSv1.3');
client.end();
Expand Down
Loading