test: move dherror.pem to fixtures/keys/

PR-URL: https://github.com/nodejs/node/pull/27962
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Alex Aubuchon 2019-05-29 12:07:53 -07:00 committed by Rich Trott
parent 7b221fb3cd
commit 9830afe7f7
3 changed files with 8 additions and 5 deletions

View File

@ -24,6 +24,7 @@ all: \
dh512.pem \
dh1024.pem \
dh2048.pem \
dherror.pem \
dsa_params.pem \
dsa_private.pem \
dsa_private_encrypted.pem \
@ -578,6 +579,9 @@ dh1024.pem:
dh2048.pem:
openssl dhparam -out dh2048.pem 2048
dherror.pem: dh512.pem
sed 's/^[^-].*/AAAAAAAAAA/g' dh512.pem > dherror.pem
dsa_params.pem:
openssl dsaparam -out dsa_params.pem 2048

View File

@ -1,3 +1,4 @@
-----BEGIN DH PARAMETERS-----
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
-----END DH PARAMETERS-----

View File

@ -44,10 +44,8 @@ common.expectWarning('SecurityWarning',
'DH parameter is less than 2048 bits');
function loadDHParam(n) {
const params = [`dh${n}.pem`];
if (n !== 'error')
params.unshift('keys');
return fixtures.readSync(params);
const keyname = `dh${n}.pem`;
return fixtures.readKey(keyname);
}
function test(keylen, expectedCipher, cb) {