|
@ -138,7 +138,7 @@ ASN1.parse = function parseAsn1(buf, depth, ws) { |
|
|
//console.warn(ws + '0x' + Enc.numToHex(asn1.type), index, 'len:', asn1.length, asn1);
|
|
|
//console.warn(ws + '0x' + Enc.numToHex(asn1.type), index, 'len:', asn1.length, asn1);
|
|
|
} |
|
|
} |
|
|
if (index !== (2 + asn1.lengthSize + asn1.length)) { |
|
|
if (index !== (2 + asn1.lengthSize + asn1.length)) { |
|
|
throw new Error("premature end-of-file (" + 'index: ' + index + ' length: ' + (2 + asn1.lengthSize + asn1.length)); |
|
|
throw new Error("premature end-of-file (" + 'index: ' + index + ' length: ' + (2 + asn1.lengthSize + asn1.length) + ")"); |
|
|
} |
|
|
} |
|
|
if (iters >= 15) { throw new Error(ASN1.ELOOP); } |
|
|
if (iters >= 15) { throw new Error(ASN1.ELOOP); } |
|
|
|
|
|
|
|
|