On 29/11/2010 19:34, Dr Stephen Henson wrote: > > You can get a UTF8String from most string types using ASN1_STRING_to_UTF8(). > This should be adequate for most purposes: it doesn't handle the more bizarre > TeletexString shift conversions but those are rarely encountered in practice. >
I should have also included a note of warning about ASN1_STRING_to_UTF8(). You cannot safely assume that the result will be a null terminated string as many ASN1 string types can include embedded nulls: this can have security implications in some cases. Steve. -- Dr Stephen N. Henson. Senior Technical/Cryptography Advisor, Open Source Software Institute: www.oss-institute.org OpenSSL Core team: www.openssl.org