Hi Bin,

# openssl x509 -in test.pem -noout -text -nameopt oneline,show_type

Subject: C = PRINTABLESTRING:US, ST = PRINTABLESTRING:California, O = 
T61STRING:\C3\A6\C2\B7\C2\84\C3\A5\C2\8D\C2\9A\C3\A7\C2\BD\C2\91\C3\A7\C2\BB\C2\9C,
 OU = PRINTABLESTRING:QA, CN = 
T61STRING:www.d8t.net-\C3\A4\C2\B8\C2\AD\C3\A6\C2\96\C2\87, emailAddress = 
IA5STRING:w...@qa.juniper.net

Your cert subject is multi-byte, but using TeletexString (T61String) encoding 
instead of UTF8. OpenSSL commandline handles multi-byte if it is UTF-8 encoded. 
Not all certificate tools, especially those web-based, can handle multibyte 
encodings other then UTF8.

For a exemplary multi-byte UTF-8 demo-cert using Japanese Katakana/Kanji, 
please see http://www.frank4dd.com/sw/webcert/export/0E13.pem.
You can also use a online cert validator, e.g. 
http://www.frank4dd.com/sw/webcert/cgi-bin/certvalidate.cgi to check for UTF-8 
output.

Hope this helps in the right direction,
Frank

From: Bin Lu 
Sent: Thursday, September 12, 2013 9:44 AM
To: openssl-users@openssl.org 
Subject: FW: multi-byte subject DN display

Re-post … as nobody responded.

 

If I use “–nameopt utf8” option, the output of the subject is empty even for 
ascii string subject DN. This does not seem to match what is said in the man 
page. A bug?

 

Please try out with the attached certificate (removing the .txt ext).

 

Thanks,

-binlu

 

From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] 
On Behalf Of Bin Lu
Sent: Wednesday, September 04, 2013 6:09 PM
To: openssl-users@openssl.org
Subject: multi-byte subject DN display

 

Hi,

 

This looks too easy but I am stuck … I am trying to display the subject name of 
a certificate which contains multi-byte characters. I tried 

 

$ openssl x509 –in <cert_file> -noout –subject –nameopt RFC2253 ( or 
oneline,-esc_msb)

 

And display the output in a web browser (IE or firefox) with character encoding 
set to UTF-8, neither gives me the right display.

 

Am I missing something? The characters are displayed correctly in the windows 
certificate viewer.

 

Thanks,

-binlu

 

Reply via email to