Skip to content

Commit

Permalink
test: log when openssl doesn't support cipher
Browse files Browse the repository at this point in the history
This fixes browserify#37.
  • Loading branch information
kapouer committed Jan 3, 2018
1 parent 44a10f6 commit 5b95e2a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 5b95e2a

Please sign in to comment.