Hi All, I am facing some problem while using SSL_connect.
Problem: I'm using openssl in a mutithreaded application. OpenSSL is used to connect Unix box from Windows box to fetch some information. While calling SSL_Connect() from windows, i get a return value as -1. For this SSL_get_error() returns error code as 1, while ERR_get_error() returns Error code 336142597. On the Unix Box side I'm getting error as "sslv3 alert illegal parameter" and due to this handshake failed while calling tls::handshake $<channel identifier> And I'm not able to connect to the Unix Box. Detail Description: I can configure to run my application either in single threaded or multithreaded mode. 1. When I run the application in single thread, I never face this problem, everything works fine. 2. When I run the application in a multithreaded mode, and on a given thread a single connection is opened to the Unix box, then also everything works fine. 3. But when i run the application in a multithreaded mode and on a given thread a connection is opened/closed more than once (twice/thrice) to the Unix box, SSL connect fails intermittently. This behavior is very inconsistent. However, once such failure occurs, every subsequent connect fails with the same error, unless I shutdown the windows process and restart the windows application. Here when i say its multithreaded means on each thread I'm trying to connect to different Unix Box, and I'm using named mutex, i.e. it will never be the case of having simultaneous access to same Unix Box. And here each time i'm opening and closing connection to the Unix Box.I'm caching nothing apart from SSL_CTX * sm_pSSLContext. Even if it's not cached, the failure still occurs tls::handshake method mention above is in the tls library(wrapper on openssl), used in the Unix code base.We use tls1.3 and tls1.4. tls1.3 is used on most of the flavors whereas 1.4 is use on AIX . Is there anything I'm missing while making SSL connection multiple times on a worker thread in a multi-threaded environment? Thanks, Sumit ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]