On Tue, Nov 11, 2014, Jerry OELoo wrote: > Hi > I have put some(100+) root CA certificate files in a folder, and Use > x509_store_load_locations() to set to store load location. > > Then Use X509_STORE_CTX_init(), X509_verify_cert() to verify a certificate, > > When X509_verify_cert() return 1, I want to know which Root CA passed > verify the certificate, How can I get this information? >
You can retrieve the validated chain with X509_STORE_CTX_get1_chain(). The root CA is the last certificate in the stack. This is assuming you haven't set a verify callback that overrides lookup errors: if you have the chain may not be complete or even valid. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [email protected]
