Skip to content

Commit

Permalink
test: avoid test timeouts on rpi
Browse files Browse the repository at this point in the history
Generating 1024-bit primes on rpi test machines sometimes
causes timeouts. Avoid this situation by using 256-bit
primes when not running in FIPS mode.

PR-URL: #3902
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
  • Loading branch information
stefanmb authored and jasnell committed Dec 23, 2015
1 parent 2fe6b45 commit df21360
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-binary-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ assert.throws(function() {

// Test Diffie-Hellman with two parties sharing a secret,
// using various encodings as we go along
var dh1 = crypto.createDiffieHellman(1024);
var dh1 = crypto.createDiffieHellman(common.hasFipsCrypto ? 1024 : 256);
var p1 = dh1.getPrime('buffer');
var dh2 = crypto.createDiffieHellman(p1, 'base64');
var key1 = dh1.generateKeys();
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-dh.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var crypto = require('crypto');

// Test Diffie-Hellman with two parties sharing a secret,
// using various encodings as we go along
var dh1 = crypto.createDiffieHellman(1024);
var dh1 = crypto.createDiffieHellman(common.hasFipsCrypto ? 1024 : 256);
var p1 = dh1.getPrime('buffer');
var dh2 = crypto.createDiffieHellman(p1, 'buffer');
var key1 = dh1.generateKeys();
Expand Down

0 comments on commit df21360

Please sign in to comment.