asn1parse genstr question

Dmitry Belyavsky beldmit at
Sun Apr 21 15:58:53 UTC 2019


I try to create an extension containing an utf8 string.

When I use a command

openssl asn1parse -genstr "UTF8String:ф" -out content

I get a 6-byte file. If I understand correctly, it starts with a 2-byte
header indicating the content length and then contains an encoded letter
'ф' I want. But the encoding of it is not UTF8, as the utf8 encoding of a
cyrillic letter is 2 bytes long.

Am I wrong? If the behavior I see is desired one, how can I convert the
result of the encoding to UTF8 using openssl internal API?

SY, Dmitry Belyavsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the openssl-users mailing list