On Mon, Oct 06, 2003, chiba4mail wrote: > Hi everybody, > I need to extrect the list of CA sent from server to > client in > certificate_request message. I have a buffer with all > ssl_handshake > message (bytes) and I can extarct from it each single > field that > I need. > So I have extracted the bytes that rapresent DN of a > CA, but > I can't understand nothing of it, probably because it > is in ASN1 > format. > Which function can I use to correctly extract the DN ? >
If you have the DER form you can convert it to an X509_NAME using d2i_X509_NAME(). From there you can convert it to text using X509_NAME_print_ex() or manipulate it with the documented X509_NAME utility functions. Steve. -- Dr Stephen N. Henson. Core developer of the OpenSSL project: http://www.openssl.org/ Freelance consultant see: http://www.drh-consultancy.demon.co.uk/ Email: [EMAIL PROTECTED], PGP key: via homepage. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]