Skip to content

Commit

Permalink
Revert "test: skip different params test for OpenSSL 3.x"
Browse files Browse the repository at this point in the history
This reverts commit 269f513.

Fixes: #38216

PR-URL: #40640
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
danbev authored and danielleadams committed Jan 30, 2022
1 parent adcc29c commit ece974e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/parallel/test-crypto-dh-stateless.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,13 @@ test(crypto.generateKeyPairSync('dh', { group: 'modp5' }),
test(crypto.generateKeyPairSync('dh', { group: 'modp5' }),
crypto.generateKeyPairSync('dh', { prime: group.getPrime() }));

const list = [];
// Same generator, but different primes.
// TODO(danbev) only commenting out this so that we can get our CI build
// to pass. I'll continue looking into the cause/change.
// [{ group: 'modp5' }, { group: 'modp18' }]];
const list = [
// Same generator, but different primes.
[{ group: 'modp5' }, { group: 'modp18' }]];

// TODO(danbev): Take a closer look if there should be a check in OpenSSL3
// when the dh parameters differ.
if (!common.hasOpenSSL3) {
// Same generator, but different primes.
list.push([{ group: 'modp5' }, { group: 'modp18' }]);
// Same primes, but different generator.
list.push([{ group: 'modp5' }, { prime: group.getPrime(), generator: 5 }]);
// Same generator, but different primes.
Expand All @@ -167,7 +163,7 @@ for (const [params1, params2] of list) {
crypto.generateKeyPairSync('dh', params2));
}, common.hasOpenSSL3 ? {
name: 'Error',
code: 'ERR_OSSL_DH_INVALID_PUBLIC_KEY'
code: 'ERR_OSSL_MISMATCHING_DOMAIN_PARAMETERS'
} : {
name: 'Error',
code: 'ERR_OSSL_EVP_DIFFERENT_PARAMETERS'
Expand Down

0 comments on commit ece974e

Please sign in to comment.