indutny / asn1.js

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

add bmpstr support #53

Closed fleg closed 8 years ago

fleg commented 8 years ago

tested on node v0.10.40 and v5.1.0

fleg commented 8 years ago

I'm also saw bmpstr implementation in #47, it uses ucs2 (utf16le), but bmpstr should use utf16be (like here), am I right?

indutny commented 8 years ago

@fleg do you have any use case for this? Perhaps some DER encoded data that could be included in a test?

indutny commented 8 years ago

Few nits, otherwise LGTM. Thank you!

fleg commented 8 years ago

fixed

fleg commented 8 years ago

I have this cert Almost all strings in issuer field have bmpstr encoding, it also has unsupported numstr and printstr strings.

numstr and printstr looks like simple ascii strings with limited characters set: 0-9\s for numstr and A-Za-z0-9\s'\(\)\+,\-\.\/:=\? for printstr. I can try add this strings in this or another pr

indutny commented 8 years ago

Thank you! Landed and released in 4.1.0.