$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r86463 - trunk/boost/asio/ssl/impl
From: chris_at_[hidden]
Date: 2013-10-26 18:35:32
Author: chris_kohlhoff
Date: 2013-10-26 18:35:32 EDT (Sat, 26 Oct 2013)
New Revision: 86463
URL: http://svn.boost.org/trac/boost/changeset/86463
Log:
Support older versions of OpenSSL that don't supply SSL_CTX_clear_options.
Text files modified: 
   trunk/boost/asio/ssl/impl/context.ipp |    16 ++++++++++++----                        
   1 files changed, 12 insertions(+), 4 deletions(-)
Modified: trunk/boost/asio/ssl/impl/context.ipp
==============================================================================
--- trunk/boost/asio/ssl/impl/context.ipp	Sat Oct 26 18:32:01 2013	(r86462)
+++ trunk/boost/asio/ssl/impl/context.ipp	2013-10-26 18:35:32 EDT (Sat, 26 Oct 2013)	(r86463)
@@ -236,19 +236,27 @@
 boost::system::error_code context::clear_options(
     context::options o, boost::system::error_code& ec)
 {
-#if !defined(SSL_OP_NO_COMPRESSION)
+#if (OPENSSL_VERSION_NUMBER >= 0x009080DFL) \
+  && (OPENSSL_VERSION_NUMBER != 0x00909000L)
+# if !defined(SSL_OP_NO_COMPRESSION)
   if ((o & context::no_compression) != 0)
   {
-#if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
     handle_->comp_methods = SSL_COMP_get_compression_methods();
-#endif // (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+# endif // (OPENSSL_VERSION_NUMBER >= 0x00908000L)
     o ^= context::no_compression;
   }
-#endif // !defined(SSL_OP_NO_COMPRESSION)
+# endif // !defined(SSL_OP_NO_COMPRESSION)
 
   ::SSL_CTX_clear_options(handle_, o);
 
   ec = boost::system::error_code();
+#else // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
+      //   && (OPENSSL_VERSION_NUMBER != 0x00909000L)
+  (void)o;
+  ec = boost::asio::error::operation_not_supported;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
+       //   && (OPENSSL_VERSION_NUMBER != 0x00909000L)
   return ec;
 }