On Mon, Sep 26, 2005, Vincent WYON wrote: > Hi Victor, > > So, if i understood you, i must convert my input string (ISO-8859-1 to > UTF-8) before passing it to the function X509_Name_add_entry_by_NID. > I thought that it was the function which converted my input string to > UTF-8.... > > Ok, I'll test it.... Do you know a function (in C language) which doing this > conversion ? >
Keep the character type as MBSTRING_ASC and it should convert from ISO-8850-1 correctly. Alternatively if you have the input in Unicode BMPString format (2 bytes per character, no BOF, big endian format) you can use MBSTRING_BMP. The character type it ends up as depends on the current value of the DirectoryString mask. If you want to force the use of UTF8 (as required by RFC3280) you can do: ASN1_STRING_set_default_mask(B_ASN1_UTF8STRING); Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]