switch( m_iMethod )
{
- case SSL2:
- m_ssl_ctx = SSL_CTX_new ( SSLv2_client_method() );
- if ( !m_ssl_ctx )
- {
- CS_DEBUG( "WARNING: MakeConnection .... SSLv2_client_method failed!" );
- return( false );
- }
- break;
-
case SSL3:
m_ssl_ctx = SSL_CTX_new ( SSLv3_client_method() );
if ( !m_ssl_ctx )
return( false );
}
break;
+ case SSL2:
+#ifndef OPENSSL_NO_SSL2
+ m_ssl_ctx = SSL_CTX_new ( SSLv2_client_method() );
+ if ( !m_ssl_ctx )
+ {
+ CS_DEBUG( "WARNING: MakeConnection .... SSLv2_client_method failed!" );
+ return( false );
+ }
+ break;
+#endif
+ /* Fall through if SSL2 is disabled */
case SSL23:
default:
m_ssl_ctx = SSL_CTX_new ( SSLv23_client_method() );
switch( m_iMethod )
{
- case SSL2:
- m_ssl_ctx = SSL_CTX_new ( SSLv2_server_method() );
- if ( !m_ssl_ctx )
- {
- CS_DEBUG( "WARNING: MakeConnection .... SSLv2_server_method failed!" );
- return( false );
- }
- break;
-
case SSL3:
m_ssl_ctx = SSL_CTX_new ( SSLv3_server_method() );
if ( !m_ssl_ctx )
return( false );
}
break;
-
+#ifndef OPENSSL_NO_SSL2
+ case SSL2:
+ m_ssl_ctx = SSL_CTX_new ( SSLv2_server_method() );
+ if ( !m_ssl_ctx )
+ {
+ CS_DEBUG( "WARNING: MakeConnection .... SSLv2_server_method failed!" );
+ return( false );
+ }
+ break;
+#endif
+ /* Fall through if SSL2 is disabled */
case SSL23:
default:
m_ssl_ctx = SSL_CTX_new ( SSLv23_server_method() );