File: test-hash.patch

package info (click to toggle)
node-browserify-sign 4.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 332 kB
  • sloc: makefile: 4; sh: 2
file content (24 lines) | stat: -rw-r--r-- 733 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: openssl in debian supports a stricter set of hashes
Forwarded: https://github.com/crypto-browserify/browserify-sign/issues/37
Last-Update: 2017-12-29
Author: Jérémy Lal <kapouer@melix.org>
--- a/test/index.js
+++ b/test/index.js
@@ -63,8 +63,15 @@
   }
 
   test(f.message, function (t) {
-    var nSign = nCrypto.createSign(f.scheme)
-    var bSign = bCrypto.createSign(f.scheme)
+    var nSign, bSign
+    try {
+      nSign = nCrypto.createSign(f.scheme)
+      bSign = bCrypto.createSign(f.scheme)
+    } catch(ex) {
+      console.info("skipping unsupported scheme", f.scheme)
+      t.end()
+      return
+    }
 
     var bSig = bSign.update(message).sign(priv)
     var nSig = nSign.update(message).sign(priv)