hi guys, someone can help me? I getting error in a SSL_read call.
SSL_read return -1 and SSL_get_error( GetSSL(), -1 ) return error:00000005:lib(0):func(0):DH lib I have a thread like this sckClient = accept( pMe->m_socket, ( struct sockaddr * ) & stClient, & intAddrSize ); if( sckClient == INVALID_SOCKET ) { std::stringstream str; str << "Error in accept instruction [" << GetLastErrorStr( WSAGetLastError() ) << "]. Closing GC"; pMe->m_logMngr.PrintLog( LOG_WITH_LEVELCHECK, LOG_LEVEL_1, "CClientAcceptThread::ThreadAccept", "ERROR %s", str.str().c_str() ); continue; } if( pMe->GetProtocolType() == PROTOCOL_TYPE_SSL ) { ssl = SSL_new ( pMe->GetContext() ); if( ssl == NULL ) { pMe->m_logMngr.PrintLog( LOG_WITH_LEVELCHECK, LOG_LEVEL_1, "CClientAcceptThread::ThreadAccept", "ERROR The creation of a new SSL structure failed." ); closesocket( sckClient ); continue; } SSL_set_fd (ssl, sckClient); err = SSL_accept (ssl); if( err != 1 ) { if( err == 0 ) pMe->m_logMngr.PrintLog( LOG_WITH_LEVELCHECK, LOG_LEVEL_1, "CClientAcceptThread::ThreadAccept", "ERROR The TLS/SSL handshake was not successful but was shut down controlled and by the specifications of the TLS/SSL protocol." ); else { err = SSL_get_error( ssl, err ); pMe->m_logMngr.PrintLog( LOG_WITH_LEVELCHECK, LOG_LEVEL_1, "CClientAcceptThread::ThreadAccept", "ERROR %s [CODE=%d]", ERR_error_string( err, szErr ), err ); } pMe->m_pGCApp->CloseSocket( sckClient, ssl ); continue; } }