Hello, I'm trying to write an ocsp server. I have source code in file server.c. When I try to compile it with gcc, everything is ok, compilation is successful. But I want to add some new features and I want to use classes. So, I changed the extension to .cpp, and here is the problem. The same code does not compile any more. I tried with gcc, g++, c++. The problem is with function i2d_OCSP_RESPONSE_bio(). Check this:
#include <openssl/ocsp.h> int main() { BIO *bio; OCSP_RESPONSE *resp; i2d_OCSP_RESPONSE_bio(bio, resp); return 0; } That code compiles ok, when it is in file server.c, but fails to compile in file server.cpp. Later, I exchanged the function with its definition in ocsp.h. int main() { BIO *bio; OCSP_RESPONSE *resp; ASN1_d2i_bio((char*(*)()) OCSP_REQUEST_new,(char ... *(*)())d2i_OCSP_RESPONSE, bio, (unsigned char **) resp); return 0; } I suppose the preprocessor would make the same. Now, compilation is successful both with gcc and g++. However, this function only works fine when the source is compiled with gcc. When compiled with g++, program hangs on that function, and the ocsp client (OpenSSL) does not receive response. When I kill the client application, my server goes on. Does anyone know what could be the problem? My system is SUSE 9.3 Prof. I also tried compilation on Knoppix 3.8.1 with the same result. OpenSSL version 0.9.7e and 0.9.7f-6. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]