|
|
|
@ -164,10 +164,10 @@ bool SslConnection::disconnect()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @note I have to check the ref count?! This stinks
|
|
|
|
|
if (m_sslHandle && m_sslHandle->references > 0)
|
|
|
|
|
if (m_sslHandle /*&& m_sslHandle->references > 0*/)
|
|
|
|
|
SSL_free(m_sslHandle);
|
|
|
|
|
|
|
|
|
|
if (m_sslHandle && m_sslContext->references > 0)
|
|
|
|
|
if (m_sslHandle /*&& m_sslContext->references > 0*/)
|
|
|
|
|
SSL_CTX_free(m_sslContext);
|
|
|
|
|
|
|
|
|
|
m_sslHandle = 0;
|
|
|
|
@ -186,7 +186,7 @@ bool SslConnection::initServerContext( const std::string certificateFile,
|
|
|
|
|
{
|
|
|
|
|
TRACE;
|
|
|
|
|
|
|
|
|
|
m_sslContext = SSL_CTX_new (TLSv1_2_server_method ());
|
|
|
|
|
m_sslContext = SSL_CTX_new (TLS_server_method ());
|
|
|
|
|
if ( m_sslContext == NULL ) {
|
|
|
|
|
LOG (Logger::ERR, getSslError("Creating SSL context failed. ").c_str() );
|
|
|
|
|
return false;
|
|
|
|
@ -208,7 +208,7 @@ bool SslConnection::initClientContext()
|
|
|
|
|
{
|
|
|
|
|
TRACE;
|
|
|
|
|
|
|
|
|
|
m_sslContext = SSL_CTX_new (TLSv1_2_client_method ());
|
|
|
|
|
m_sslContext = SSL_CTX_new (TLS_client_method ());
|
|
|
|
|
if ( m_sslContext == NULL ) {
|
|
|
|
|
LOG (Logger::ERR, getSslError("Creating SSL context failed. ").c_str() );
|
|
|
|
|
return false;
|
|
|
|
|