The code below fails sometimes( it prints "error"). I don't understand why. I have a multi threaded application, and all the threads may be doing the following code simultaneously. Are the functions d2i_X509_fp and PEM_read_X509 thread safe?
The variables - x509, fp, cert_filename are local non-static variables in the function. The following is a code snippet. if((fp = fopen (cert_filename, "r"))) { x509=NULL; if(!(x509=d2i_X509_fp(fp, NULL))) { fseek(fp, 0, SEEK_SET); x509 = PEM_read_X509( fp, NULL, NULL, NULL ); } if( !x509 ) { printf("error\n"); } } Any help is greatly appreciated in this regard. Thank you. __________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]