From 0fdea88c5b7b8985100c359edf402c70104bc876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 31 Jan 2021 16:22:42 +0100 Subject: [PATCH] [fixup] only run test if OpenSSL supports it --- test/parallel/test-crypto-prime.js | 32 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/test/parallel/test-crypto-prime.js b/test/parallel/test-crypto-prime.js index d4e95fa9ec68a99..27f34adea36d9e3 100644 --- a/test/parallel/test-crypto-prime.js +++ b/test/parallel/test-crypto-prime.js @@ -139,22 +139,24 @@ generatePrime( // The behavior when specifying only add without rem should depend on the // safe option. - generatePrime(128, { - bigint: true, - add: 5n - }, common.mustSucceed((prime) => { - assert(checkPrimeSync(prime)); - assert.strictEqual(prime % 5n, 1n); - })); + if (process.versions.openssl >= '1.1.1f') { + generatePrime(128, { + bigint: true, + add: 5n + }, common.mustSucceed((prime) => { + assert(checkPrimeSync(prime)); + assert.strictEqual(prime % 5n, 1n); + })); - generatePrime(128, { - bigint: true, - safe: true, - add: 5n - }, common.mustSucceed((prime) => { - assert(checkPrimeSync(prime)); - assert.strictEqual(prime % 5n, 3n); - })); + generatePrime(128, { + bigint: true, + safe: true, + add: 5n + }, common.mustSucceed((prime) => { + assert(checkPrimeSync(prime)); + assert.strictEqual(prime % 5n, 3n); + })); + } } [1, 'hello', {}, []].forEach((i) => {