Skip to content

Commit 4882b1e

Browse files
author
Leonardo Zanivan
committed
Default to SHA1 as OAEP hash
1 parent 08394e8 commit 4882b1e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/xmlenc.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,9 @@ function decryptKeyInfo(doc, options) {
249249
case 'http://www.w3.org/2000/09/xmldsig#sha256':
250250
options.oaepHash = 'sha256';
251251
break;
252-
case 'http://www.w3.org/2000/09/xmldsig#sha512':
253-
options.oaepHash = 'sha512';
254-
break;
255-
default:
256-
throw new Error('key encryption digest algorithm ' + keyDigestMethodAlgorithm + ' not supported');
252+
case 'http://www.w3.org/2000/09/xmldsig#sha512':
253+
options.oaepHash = 'sha512';
254+
break;
257255
}
258256
}
259257

0 commit comments

Comments
 (0)