summaryrefslogtreecommitdiff
path: root/boost/asio/ssl/detail
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/ssl/detail')
-rw-r--r--boost/asio/ssl/detail/buffered_handshake_op.hpp2
-rw-r--r--boost/asio/ssl/detail/engine.hpp2
-rw-r--r--boost/asio/ssl/detail/handshake_op.hpp2
-rw-r--r--boost/asio/ssl/detail/impl/engine.ipp5
-rw-r--r--boost/asio/ssl/detail/impl/openssl_init.ipp6
-rw-r--r--boost/asio/ssl/detail/io.hpp6
-rw-r--r--boost/asio/ssl/detail/openssl_init.hpp2
-rw-r--r--boost/asio/ssl/detail/openssl_types.hpp2
-rw-r--r--boost/asio/ssl/detail/password_callback.hpp2
-rw-r--r--boost/asio/ssl/detail/read_op.hpp2
-rw-r--r--boost/asio/ssl/detail/shutdown_op.hpp2
-rw-r--r--boost/asio/ssl/detail/stream_core.hpp2
-rw-r--r--boost/asio/ssl/detail/verify_callback.hpp2
-rw-r--r--boost/asio/ssl/detail/write_op.hpp2
14 files changed, 23 insertions, 16 deletions
diff --git a/boost/asio/ssl/detail/buffered_handshake_op.hpp b/boost/asio/ssl/detail/buffered_handshake_op.hpp
index 10608b0eb9..74f12f41a8 100644
--- a/boost/asio/ssl/detail/buffered_handshake_op.hpp
+++ b/boost/asio/ssl/detail/buffered_handshake_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/buffered_handshake_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/engine.hpp b/boost/asio/ssl/detail/engine.hpp
index 8b24a96f01..b84c22c2fd 100644
--- a/boost/asio/ssl/detail/engine.hpp
+++ b/boost/asio/ssl/detail/engine.hpp
@@ -2,7 +2,7 @@
// ssl/detail/engine.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/handshake_op.hpp b/boost/asio/ssl/detail/handshake_op.hpp
index b886bb52f6..d8be283a0d 100644
--- a/boost/asio/ssl/detail/handshake_op.hpp
+++ b/boost/asio/ssl/detail/handshake_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/handshake_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/impl/engine.ipp b/boost/asio/ssl/detail/impl/engine.ipp
index 5aa9b5a68a..3fcfd70d8e 100644
--- a/boost/asio/ssl/detail/impl/engine.ipp
+++ b/boost/asio/ssl/detail/impl/engine.ipp
@@ -2,7 +2,7 @@
// ssl/detail/impl/engine.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -211,7 +211,7 @@ const boost::system::error_code& engine::map_error_code(
// SSL v2 doesn't provide a protocol-level shutdown, so an eof on the
// underlying transport is passed through.
- if (ssl_ && ssl_->version == SSL2_VERSION)
+ if (ssl_->version == SSL2_VERSION)
return ec;
// Otherwise, the peer should have negotiated a proper shutdown.
@@ -236,6 +236,7 @@ engine::want engine::perform(int (engine::* op)(void*, std::size_t),
std::size_t* bytes_transferred)
{
std::size_t pending_output_before = ::BIO_ctrl_pending(ext_bio_);
+ ::ERR_clear_error();
int result = (this->*op)(data, length);
int ssl_error = ::SSL_get_error(ssl_, result);
int sys_error = static_cast<int>(::ERR_get_error());
diff --git a/boost/asio/ssl/detail/impl/openssl_init.ipp b/boost/asio/ssl/detail/impl/openssl_init.ipp
index d732fef309..8326c84144 100644
--- a/boost/asio/ssl/detail/impl/openssl_init.ipp
+++ b/boost/asio/ssl/detail/impl/openssl_init.ipp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -64,7 +64,11 @@ public:
::CRYPTO_set_id_callback(0);
::CRYPTO_set_locking_callback(0);
::ERR_free_strings();
+#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ ::ERR_remove_thread_state(NULL);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10000000L)
::ERR_remove_state(0);
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10000000L)
::EVP_cleanup();
::CRYPTO_cleanup_all_ex_data();
::CONF_modules_unload(1);
diff --git a/boost/asio/ssl/detail/io.hpp b/boost/asio/ssl/detail/io.hpp
index ef821000ba..2e889ec8b0 100644
--- a/boost/asio/ssl/detail/io.hpp
+++ b/boost/asio/ssl/detail/io.hpp
@@ -2,7 +2,7 @@
// ssl/detail/io.hpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -225,7 +225,9 @@ public:
}
default:
- if (bytes_transferred != ~std::size_t(0) && !ec_)
+ if (bytes_transferred == ~std::size_t(0))
+ bytes_transferred = 0; // Timer cancellation, no data transferred.
+ else if (!ec_)
ec_ = ec;
switch (want_)
diff --git a/boost/asio/ssl/detail/openssl_init.hpp b/boost/asio/ssl/detail/openssl_init.hpp
index 985c14d9c5..221709aa03 100644
--- a/boost/asio/ssl/detail/openssl_init.hpp
+++ b/boost/asio/ssl/detail/openssl_init.hpp
@@ -2,7 +2,7 @@
// ssl/detail/openssl_init.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/openssl_types.hpp b/boost/asio/ssl/detail/openssl_types.hpp
index 58b4733db6..c83d110b2a 100644
--- a/boost/asio/ssl/detail/openssl_types.hpp
+++ b/boost/asio/ssl/detail/openssl_types.hpp
@@ -2,7 +2,7 @@
// ssl/detail/openssl_types.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/password_callback.hpp b/boost/asio/ssl/detail/password_callback.hpp
index d64bf3a5be..1ba89900bd 100644
--- a/boost/asio/ssl/detail/password_callback.hpp
+++ b/boost/asio/ssl/detail/password_callback.hpp
@@ -2,7 +2,7 @@
// ssl/detail/password_callback.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/read_op.hpp b/boost/asio/ssl/detail/read_op.hpp
index e0a0ad0ee8..df50540e63 100644
--- a/boost/asio/ssl/detail/read_op.hpp
+++ b/boost/asio/ssl/detail/read_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/read_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/shutdown_op.hpp b/boost/asio/ssl/detail/shutdown_op.hpp
index 6a716f7090..1a206c1643 100644
--- a/boost/asio/ssl/detail/shutdown_op.hpp
+++ b/boost/asio/ssl/detail/shutdown_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/shutdown_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/stream_core.hpp b/boost/asio/ssl/detail/stream_core.hpp
index 663e258c03..2ef4110fc7 100644
--- a/boost/asio/ssl/detail/stream_core.hpp
+++ b/boost/asio/ssl/detail/stream_core.hpp
@@ -2,7 +2,7 @@
// ssl/detail/stream_core.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/verify_callback.hpp b/boost/asio/ssl/detail/verify_callback.hpp
index eb40f488f4..5ddc89a9e1 100644
--- a/boost/asio/ssl/detail/verify_callback.hpp
+++ b/boost/asio/ssl/detail/verify_callback.hpp
@@ -2,7 +2,7 @@
// ssl/detail/verify_callback.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/boost/asio/ssl/detail/write_op.hpp b/boost/asio/ssl/detail/write_op.hpp
index 24020983df..d7b49c936b 100644
--- a/boost/asio/ssl/detail/write_op.hpp
+++ b/boost/asio/ssl/detail/write_op.hpp
@@ -2,7 +2,7 @@
// ssl/detail/write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)