@lapo/asn1js
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -142,3 +142,3 @@ // ASN.1 JavaScript decoder | ||
if (len === 0) | ||
return neg ? -1 : 0; | ||
return neg ? '-1' : '0'; | ||
// show bit length of huge integers | ||
@@ -416,6 +416,8 @@ if (len > 4) { | ||
var end = start + len; | ||
if (end > stream.enc.length) | ||
throw 'Container at offset ' + start + ' has a length of ' + len + ', which is past the end of the stream'; | ||
while (stream.pos < end) | ||
sub[sub.length] = ASN1.decode(stream); | ||
if (stream.pos != end) | ||
throw "Content size is not correct for container starting at offset " + start; | ||
throw 'Content size is not correct for container at offset ' + start; | ||
} else { | ||
@@ -432,3 +434,3 @@ // undefined length | ||
} catch (e) { | ||
throw "Exception while decoding undefined length content: " + e; | ||
throw 'Exception while decoding undefined length content at offset ' + start + ': ' + e; | ||
} | ||
@@ -453,2 +455,3 @@ } | ||
sub = null; | ||
//DEBUG console.log('Could not decode structure at ' + start + ':', e); | ||
} | ||
@@ -455,0 +458,0 @@ } |
{ | ||
"name": "@lapo/asn1js", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Generic ASN.1 parser/decoder that can decode any valid ASN.1 DER or BER structures.", | ||
@@ -5,0 +5,0 @@ "main": "asn1.js", |
@@ -6,3 +6,3 @@ asn1js | ||
An example page that can decode Base64-encoded (raw base64, PEM armoring and `begin-base64` are recognized) or Hex-encoded (or local files with some browsers) is included and can be used both [online on the official website](http://lapo.it/asn1js/) or [offline (ZIP file)](http://lapo.it/asn1js/asn1js.zip). | ||
An example page that can decode Base64-encoded (raw base64, PEM armoring and `begin-base64` are recognized) or Hex-encoded (or local files with some browsers) is included and can be used both [online on the official website](https://lapo.it/asn1js/) or [offline (ZIP file)](https://lapo.it/asn1js/asn1js.zip). | ||
@@ -12,3 +12,3 @@ ISC license | ||
ASN.1 JavaScript decoder Copyright (c) 2008-2014 Lapo Luchini <lapo@lapo.it> | ||
ASN.1 JavaScript decoder Copyright (c) 2008-2018 Lapo Luchini <lapo@lapo.it> | ||
@@ -22,3 +22,3 @@ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. | ||
- OBJECT IDENTIFIER values are recognized using data taken from Peter Gutmann's [dumpasn1](http://www.cs.auckland.ac.nz/~pgut001/#standards) program. | ||
- OBJECT IDENTIFIER values are recognized using data taken from Peter Gutmann's [dumpasn1](https://www.cs.auckland.ac.nz/~pgut001/#standards) program. | ||
- BMPString support added by [Felipe Gasper](https://github.com/FGasper) | ||
@@ -31,5 +31,5 @@ - extended tag support added by [Péter Budai](https://www.peterbudai.eu/) | ||
- [official website](http://lapo.it/asn1js/) | ||
- [official website](https://lapo.it/asn1js/) | ||
- [InDefero tracker](http://idf.lapo.it/p/asn1js/) | ||
- [GitHub mirror](https://github.com/lapo-luchini/asn1js) | ||
- [Ohloh code stats](https://www.ohloh.net/p/asn1js) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221275
2997