Thor Lancelot Simon wrote:
Can I assume that any data returned when I access the DN of a peer's
certificate using OpenSSL are ASCII or UTF8?

No, see Howards posts.

If not, how do I tell
the difference?

I think I understand that DNs not encoded as UTF8String should not
have high-bit characters in them -- so if I do this:

X509_NAME_oneline(X509_get_subject_name(peer), buf, BUFSIZ), suffix)

What about X509_NAME_print_ex ?
You may check different outputs with "openssl x509 ... -nameopt [flags]" .


I should be able to tell any application using the data that the
character set for the data is UTF8, or, if I don't find any Unicode
sequences in it, ASCII.  Is that right?  I don't see a way to find
out what ASN.1 type X509_get_subject_name actually fetched the data
from...


Roumen
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to