diff --git a/test/parallel/test-crypto-binary-default.js b/test/parallel/test-crypto-binary-default.js index 8695632727fa80..9cc6bdb3e4faa5 100644 --- a/test/parallel/test-crypto-binary-default.js +++ b/test/parallel/test-crypto-binary-default.js @@ -513,7 +513,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();