Hi, Thanks for the reply. The test program works only if I put it in the main() or if I create a global function then call it in the main(). It fails if I pack the function as a member function of a cpp class in a shared library xxx.so, then call it from the main(). I know the context initialized is per application, can it be done from a different library or from a wrapper? What could be missing in this scenario?
Thanks again, -yolanda -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marek Marcola Sent: Wednesday, August 29, 2007 3:26 PM To: openssl-users@openssl.org Subject: Re: SSL_CTX_use_certificate_chain_file failure Hello, > I am trying to use SSL_CTX_use_certificate_chain_file to load a > chained certificate, but it return non-1. The wired thing is that it > doesn't print any error, I try everything ERR_print_errors_fp(), > Err_get_error(), etc. > > The first thing I want to rule out is that the file can't be found. > So, how does this function search the specified file? Is there any > setting it takes to do the search? I tried specify the absolute path > and also tried just put the file in the running directory, but they > didn't help. > > The second thing I did is to check the certificate itself to use the > command line: > openssl verify -CAfile root.pem client.pem I got the output saying > "signature OK". > > Any suggestions? Simple test code attached (and works for me). Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]