On Thu, Jun 05, 2003, Wu Junwei wrote: > Hi,all, > > I want to search for a certificate from cert-database, > But I should provide the DN for searching. > DN is the subject of the certificate,which should follow the RFC2253,like > this"CN=Jack Lee,O=XYZ Corp.,C=US". > > I don't know how I can search the certificate if I provide the X509 > structure in OpenSSL source code. > In fact, I don't know how to compare X509_NAME with the RFC2253 string. > Do you have any suggestion? >
You could print it out to a memory BIO in RFC2253 format using X509_NAME_print_ex() then compare the two results. 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]