From 5b95e2a4ab7861e9c88001b87d8820b9b851cbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= Date: Wed, 3 Jan 2018 21:22:04 +0100 Subject: [PATCH] test: log when openssl doesn't support cipher This fixes #37. --- test/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/index.js b/test/index.js index dcfd303..e1f9c5f 100644 --- a/test/index.js +++ b/test/index.js @@ -63,9 +63,15 @@ fixtures.valid.ec.forEach(function (f) { } test(f.message, function (t) { - var nSign = nCrypto.createSign(f.scheme) + var nSign + try { + nSign = nCrypto.createSign(f.scheme) + } catch (ex) { + console.info('skipping unsupported scheme', f.scheme) + t.end() + return + } var bSign = bCrypto.createSign(f.scheme) - var bSig = bSign.update(message).sign(priv) var nSig = nSign.update(message).sign(priv) t.notEqual(bSig.toString('hex'), nSig.toString('hex'), 'not equal sigs')