|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71706 - in trunk/boost/asio/ssl: detail/impl impl old/detail
From: chris_at_[hidden]
Date: 2011-05-03 19:55:04
Author: chris_kohlhoff
Date: 2011-05-03 19:55:03 EDT (Tue, 03 May 2011)
New Revision: 71706
URL: http://svn.boost.org/trac/boost/changeset/71706
Log:
Changes for openssl 1.0.
Text files modified:
trunk/boost/asio/ssl/detail/impl/engine.ipp | 4 ++++
trunk/boost/asio/ssl/impl/context.ipp | 9 +++++++++
trunk/boost/asio/ssl/old/detail/openssl_context_service.hpp | 9 +++++++++
3 files changed, 22 insertions(+), 0 deletions(-)
Modified: trunk/boost/asio/ssl/detail/impl/engine.ipp
==============================================================================
--- trunk/boost/asio/ssl/detail/impl/engine.ipp (original)
+++ trunk/boost/asio/ssl/detail/impl/engine.ipp 2011-05-03 19:55:03 EDT (Tue, 03 May 2011)
@@ -38,6 +38,10 @@
::SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE);
::SSL_set_mode(ssl_, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
+#if defined(SSL_MODE_RELEASE_BUFFERS)
+ ::SSL_set_mode(ssl_, SSL_MODE_RELEASE_BUFFERS);
+#endif // defined(SSL_MODE_RELEASE_BUFFERS)
+
::BIO* int_bio = 0;
::BIO_new_bio_pair(&int_bio, 0, &ext_bio_, 0);
::SSL_set_bio(ssl_, int_bio, int_bio);
Modified: trunk/boost/asio/ssl/impl/context.ipp
==============================================================================
--- trunk/boost/asio/ssl/impl/context.ipp (original)
+++ trunk/boost/asio/ssl/impl/context.ipp 2011-05-03 19:55:03 EDT (Tue, 03 May 2011)
@@ -39,6 +39,14 @@
{
switch (m)
{
+#if defined(OPENSSL_NO_SSL2)
+ case context::sslv2:
+ case context::sslv2_client:
+ case context::sslv2_server:
+ boost::asio::detail::throw_error(
+ boost::asio::error::invalid_argument, "context");
+ break;
+#else // defined(OPENSSL_NO_SSL2)
case context::sslv2:
handle_ = ::SSL_CTX_new(::SSLv2_method());
break;
@@ -48,6 +56,7 @@
case context::sslv2_server:
handle_ = ::SSL_CTX_new(::SSLv2_server_method());
break;
+#endif // defined(OPENSSL_NO_SSL2)
case context::sslv3:
handle_ = ::SSL_CTX_new(::SSLv3_method());
break;
Modified: trunk/boost/asio/ssl/old/detail/openssl_context_service.hpp
==============================================================================
--- trunk/boost/asio/ssl/old/detail/openssl_context_service.hpp (original)
+++ trunk/boost/asio/ssl/old/detail/openssl_context_service.hpp 2011-05-03 19:55:03 EDT (Tue, 03 May 2011)
@@ -20,6 +20,7 @@
#include <cstring>
#include <string>
#include <boost/function.hpp>
+#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/ssl/context_base.hpp>
@@ -67,6 +68,13 @@
{
switch (m)
{
+#if defined(OPENSSL_NO_SSL2)
+ case context_base::sslv2:
+ case context_base::sslv2_client:
+ case context_base::sslv2_server:
+ boost::asio::detail::throw_error(boost::asio::error::invalid_argument);
+ break;
+#else // defined(OPENSSL_NO_SSL2)
case context_base::sslv2:
impl = ::SSL_CTX_new(::SSLv2_method());
break;
@@ -76,6 +84,7 @@
case context_base::sslv2_server:
impl = ::SSL_CTX_new(::SSLv2_server_method());
break;
+#endif // defined(OPENSSL_NO_SSL2)
case context_base::sslv3:
impl = ::SSL_CTX_new(::SSLv3_method());
break;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk