node-forge 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/forge.all.min.js +1 -1
- package/dist/forge.min.js +1 -1
- package/lib/rsa.js +13 -0
- package/package.json +1 -1
package/lib/rsa.js
CHANGED
|
@@ -286,6 +286,9 @@ var digestInfoValidator = {
|
|
|
286
286
|
name: 'DigestInfo.DigestAlgorithm.parameters',
|
|
287
287
|
tagClass: asn1.Class.UNIVERSAL,
|
|
288
288
|
type: asn1.Type.NULL,
|
|
289
|
+
// captured only to check existence for md2 and md5
|
|
290
|
+
capture: 'parameters',
|
|
291
|
+
optional: true,
|
|
289
292
|
constructed: false
|
|
290
293
|
}]
|
|
291
294
|
}, {
|
|
@@ -1187,6 +1190,16 @@ pki.setRsaPublicKey = pki.rsa.setPublicKey = function(n, e) {
|
|
|
1187
1190
|
throw error;
|
|
1188
1191
|
}
|
|
1189
1192
|
|
|
1193
|
+
// special check for md2 and md5 that NULL parameters exist
|
|
1194
|
+
if(oid === forge.oids.md2 || oid === forge.oids.md5) {
|
|
1195
|
+
if(!('parameters' in capture)) {
|
|
1196
|
+
throw new Error(
|
|
1197
|
+
'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' +
|
|
1198
|
+
'DigestInfo value. ' +
|
|
1199
|
+
'Missing algorithm identifer NULL parameters.');
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1190
1203
|
// compare the given digest to the decrypted one
|
|
1191
1204
|
return digest === capture.digest;
|
|
1192
1205
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-forge",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.",
|
|
5
5
|
"homepage": "https://github.com/digitalbazaar/forge",
|
|
6
6
|
"author": {
|