On Thu, May 10, 2007, Jess el tuty wrote: > > Hi all, > > I used X509_get_subject_name() function to parse a binary X509v3 > certificate, my problem is that I don´t know whats the format of the byte > array that this function returns.
It isn't a byte array. It is an X509_NAME structure. > The common name of my certificate has the char "Ü", and the functions > returns the hexadecimal coding of this chararcter as: "ff ff ff dc". I think > that it isn´t a UTF-8 char... but I don´t know what coding is this, neither > how to convert it to UTF-8... > > Anyone could help me? > Use the X509_NAME functions to retrieve the commonName field as an X509_NAME_ENTRY structure. Then the field value as an ASN1_STRING. Finally from that you can get UTF8 format using ASN1_STRING_to_UTF8(). 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]