> I have a certificate (below). I just wonder, why the CN part (which is
> *.test.com) appear in the format of "\x00 ..."?
How did you generate this string representation?
> Certificate Subject Name=/C=US/ST=CA/L=SanJose/O=Adobe/OU=Customer
> Support/CN=\x00*\x00.\x00t\x00e\x00s\x00t.\x00c\x00o\x00m
Looks like BMPString to me. If you strip all the \x00 you'll get:
*.test.com
Seems to be a wild-card certificate for whole domain test.com.
> With this format, should I expect the original binary buffer contains
> (null)char(null)char ... format? Or it contains exact chars of
> "\x00*\x00.\x00t\x00e\x00s\x00t.\x00c\x00o\x00m" ?
I don't know what you're after. But it might be good time to start
looking into RFC 3280 (PKIX) for learning about the various ASN.1 string
types.
Ciao, Michael.