Please refer to the code below:

1-      BIO *wbio = NULL; 
2-      BIO *rbio = NULL;
3-      SSL *sslconn = NULL ;

4-      rbio = BIO_new_socket(sock,BIO_NOCLOSE) ;
5-      wbio = BIO_new_socket(sock, BIO_NOCLOSE) ;

6-      sslconn = SSL_new(ctx) ;

7-      SSL_set_bio(sslconn, wbio, rbio);

sock is a SOCKET handle passed to this routine. 
ctx is of type SSL* which is defined as a global variable
and properly initialized earlier in the program.

My application is multi-threaded. The program crashes when it reaches
line 5 giving following error message:

Unhandled exception in my_prog.exe (MSVCRTD.DLL): 0xC0000005: Access Violation

I have compiled the SSLeay with multi-threading option on.

Does anybody have any clue why the program is crashing? 
I understand that the information given here may be insufficient.
If anybody wants more information, I will be glad to provide it.

Thanks in advance,

-Shridhar.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to