Skip to content
Permalink
Browse files

test: move dherror.pem to fixtures/keys/

PR-URL: #27962
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information...
A-lxe authored and BridgeAR committed May 29, 2019
1 parent 98f7ae9 commit f41dfd71a0a9a165e59b4b859a79f07745a3d1fe
Showing with 8 additions and 5 deletions.
  1. +4 −0 test/fixtures/keys/Makefile
  2. +2 −1 test/fixtures/{ → keys}/dherror.pem
  3. +2 −4 test/parallel/test-tls-dhe.js
@@ -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

@@ -1,3 +1,4 @@
-----BEGIN DH PARAMETERS-----
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAA
AAAAAAAAAA
-----END DH PARAMETERS-----
@@ -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) {

0 comments on commit f41dfd7

Please sign in to comment.
You can’t perform that action at this time.