From 5f0dd690b46d287d339cca1decf855ca84a6600d Mon Sep 17 00:00:00 2001 From: Stefan Budeanu Date: Wed, 18 Nov 2015 11:40:32 -0500 Subject: [PATCH] test: avoid test timeouts on rpi 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: https://github.com/nodejs/node/pull/3902 Reviewed-By: Colin Ihrig Reviewed-By: Brian White Reviewed-By: Ben Noordhuis --- test/parallel/test-crypto-binary-default.js | 2 +- test/parallel/test-crypto-dh.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index ad064baeb3a66a..6299c869087a6e 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -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(); diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js index d93c53e3997dae..322b5d1c70a073 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -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();