diff --git a/Csocket.h b/Csocket.h index 8c0e2701..c4b4dc1c 100644 --- a/Csocket.h +++ b/Csocket.h @@ -1505,7 +1505,13 @@ namespace Csocket void SetSSLObject( SSL *ssl ) { m_ssl = ssl; } void SetCTXObject( SSL_CTX *sslCtx ) { m_ssl_ctx = sslCtx; } void SetFullSSLAccept() { m_bFullsslAccept = true; } - SSL_SESSION * GetSSLSession() { return( SSL_get_session( m_ssl ) ); } + SSL_SESSION * GetSSLSession() + { + if ( m_ssl ) + return( SSL_get_session( m_ssl ) ); + + return( NULL ); + } #endif /* HAVE_LIBSSL */ //! Get the send buffer