Index: asio/ssl/impl/context.ipp =================================================================== --- asio/ssl/impl/context.ipp (revision 86799) +++ asio/ssl/impl/context.ipp (working copy) @@ -87,7 +87,15 @@ handle_ = ::SSL_CTX_new(::SSLv2_server_method()); break; #endif // defined(OPENSSL_NO_SSL2) +#if defined(OPENSSL_NO_SSL3) case context::sslv3: + case context::sslv3_client: + case context::sslv3_server: + boost::asio::detail::throw_error( + boost::asio::error::invalid_argument, "context"); + break; +#else // defined(OPENSSL_NO_SSL3) + case context::sslv3: handle_ = ::SSL_CTX_new(::SSLv3_method()); break; case context::sslv3_client: @@ -96,6 +104,7 @@ case context::sslv3_server: handle_ = ::SSL_CTX_new(::SSLv3_server_method()); break; +#endif // defined(OPENSSL_NO_SSL3) case context::tlsv1: handle_ = ::SSL_CTX_new(::TLSv1_method()); break; Index: asio/ssl/old/detail/openssl_context_service.hpp =================================================================== --- asio/ssl/old/detail/openssl_context_service.hpp (revision 86799) +++ asio/ssl/old/detail/openssl_context_service.hpp (working copy) @@ -85,7 +85,14 @@ impl = ::SSL_CTX_new(::SSLv2_server_method()); break; #endif // defined(OPENSSL_NO_SSL2) +#if defined(OPENSSL_NO_SSL3) case context_base::sslv3: + case context_base::sslv3_client: + case context_base::sslv3_server: + boost::asio::detail::throw_error(boost::asio::error::invalid_argument); + break; +#else // defined(OPENSSL_NO_SSL3) + case context_base::sslv3: impl = ::SSL_CTX_new(::SSLv3_method()); break; case context_base::sslv3_client: @@ -94,6 +101,7 @@ case context_base::sslv3_server: impl = ::SSL_CTX_new(::SSLv3_server_method()); break; +#endif // defined(OPENSSL_NO_SSL3) case context_base::tlsv1: impl = ::SSL_CTX_new(::TLSv1_method()); break;