-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2580,6 +2580,10 @@ function getLength(buf, p) { | |
return false; | ||
} | ||
|
||
if(buf[p.place] === 0x00) { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
return false; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
var val = 0; | ||
for (var i = 0, off = p.place; i < octetLen; i++, off++) { | ||
val <<= 8; | ||
|
@@ -2628,6 +2632,9 @@ Signature.prototype._importDER = function _importDER(data, enc) { | |
if (rlen === false) { | ||
return false; | ||
} | ||
if ((data[p.place] & 128) !== 0) { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
return false; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
var r = data.slice(p.place, rlen + p.place); | ||
p.place += rlen; | ||
if (data[p.place++] !== 0x02) { | ||
|
@@ -2640,6 +2647,9 @@ Signature.prototype._importDER = function _importDER(data, enc) { | |
if (data.length !== slen + p.place) { | ||
return false; | ||
} | ||
if ((data[p.place] & 128) !== 0) { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
return false; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
var s = data.slice(p.place, slen + p.place); | ||
if (r[0] === 0) { | ||
if (r[1] & 0x80) { | ||
|
@@ -2951,6 +2961,7 @@ function Signature(eddsa, sig) { | |
sig = parseBytes(sig); | ||
|
||
if (Array.isArray(sig)) { | ||
assert(sig.length === eddsa.encodingLength * 2, 'Signature has invalid size'); | ||
This comment has been minimized.
Sorry, something went wrong.
KolomboPulse
|
||
sig = { | ||
R: sig.slice(0, eddsa.encodingLength), | ||
S: sig.slice(eddsa.encodingLength), | ||
|
@@ -8856,7 +8867,7 @@ utils.encode = function encode(arr, enc) { | |
},{}],35:[function(require,module,exports){ | ||
module.exports={ | ||
"name": "elliptic", | ||
"version": "6.5.6", | ||
This comment has been minimized.
Sorry, something went wrong. |
||
"version": "6.5.7", | ||
This comment has been minimized.
Sorry, something went wrong. |
||
"description": "EC cryptography", | ||
"main": "lib/elliptic.js", | ||
"files": [ | ||
|
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
if(buf[p.place] === 0x00) {