At 18:02 19.07.2002 +0900, [EMAIL PROTECTED] wrote:
>$)C
>Hello list,
>
>I'm quite new to openssl but here is a question I can't solve for myself.
>
>req_distinguished_name part of my configuration file is
>C = KR
>ST = seoul
>L = seoul
>O = telecom
>OU = telecom
>CN = H+1f5?      # It's an Korean word
>emailAddress = [EMAIL PROTECTED]
>
>I make certificate request using this configuration file, but I can't read
>CN part in the
>
>certificate request.
>
>How can I solve it ?
>
>Soo.
>
>______________________________________________________________________
>OpenSSL Project                                 http://www.openssl.org
>User Support Mailing List                    [EMAIL PROTECTED]
>Automated List Manager                           [EMAIL PROTECTED]

The openssl can certainly handle unicode, it's just that the config files
are not unicode.

I have a 0.9.6b here, and in req.c, function add_DN_object() I
can see:

         if (!X509_NAME_add_entry_by_NID(n,nid, MBSTRING_ASC,
                                 (unsigned char *) buf, -1,-1,0)) goto err;

So, it will read nothing else but ASCII characters from the config file.
If you want special characters, your best bet would be to use a
UNICODE editor, and enter your korean string with that.
Save as UTF8. Do not use any Microsoft MBCS stuff please.

Then change the code to

         if (!X509_NAME_add_entry_by_NID(n,nid, MBSTRING_UTF8,
                                 (unsigned char *) buf, -1,-1,0)) goto err;

and recompile.

Your string will be encoded as BMP in the certificate request.

Jörn Sierwald

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to