indutny / asn1.js

ASN.1 Decoder/Encoder/DSL
MIT License
181 stars 64 forks source link

Enable merging of constructed, indefinite length encoded sub-strings #68

Closed felix closed 7 years ago

felix commented 8 years ago

See http://luca.ntop.org/Teaching/Appunti/asn1.html section 2.1 for a description:

String types can be viewed, for the purposes of encoding, as consisting of components, where the components are substrings. This view allows one to encode a value whose length is not known in advance (e.g., an octet string value input from a file stream) with a constructed, indefinite- length encoding

We are seeing this in Java Bouncy Castle generated octet string blobs (10K+) using indefinite length encoding.

Added a test and all others still pass. Comments welcome.

felix commented 8 years ago

Hold off on this, found some issues with real data!

felix commented 8 years ago

Looks a lot better now, let me know if you need more changes or explanation.

felix commented 8 years ago

@indutny, any questions regarding this?

felix commented 8 years ago

@indutny, just rebased against master.

felix commented 7 years ago

@indutny ping