gbarr/perl-Convert-ASN1

BMPString data not fully decoded

Opened this issue · 0 comments

At least in Microsoft CSRs, fields that are encoded as BMPString are returned by Convert:ASN1 as a string of octets (utf-8?) , apparently UCS2-BE. If "ABC" is encoded in the CSR, it comes out of Convert::ASN1 as "\0A\0B\0C".

Although it's possible to use Encode::decode('UCS2-BE', $value) to get a Perl-compatible string, Convert::ASN1 should be doing this before the string is returned.

Given the history, it may be necessary to enable the proper behavior with an option, since double decoding would corrupt the data.

Thanks.