On Mon, Jun 16, 2008, Gerhard Gappmeier wrote: > Hi > > I can create certificates with UTF-8 Strings like this: > X509_NAME_add_entry_by_txt ( pName, "CN", MBSTRING_UTF8, ( unsigned char* ) > subject.commonName.toUtf8(), -1, -1, 0 ); > > But how can I read back entries in the same encoding? > > X509_NAME_get_text_by_NID does not return UTF-8 and I cannot find a function > where I can specify MBSTRING_UTF8. >
You need to get the individual ASN1_STRING structures for each field and then call ASN1_STRING_to_UTF8(). Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. 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]