summaryrefslogtreecommitdiff
path: root/boost/asio/ssl/detail/impl/engine.ipp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:41:18 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:43:11 +0900
commitf763a99a501650eff2c60288aa6f10ef916d769e (patch)
tree02af7e13f9a38c888ebf340fe764cbe7dae99da9 /boost/asio/ssl/detail/impl/engine.ipp
parent5cde13f21d36c7224b0e13d11c4b49379ae5210d (diff)
downloadboost-f763a99a501650eff2c60288aa6f10ef916d769e.tar.gz
boost-f763a99a501650eff2c60288aa6f10ef916d769e.tar.bz2
boost-f763a99a501650eff2c60288aa6f10ef916d769e.zip
Imported Upstream version 1.62.0upstream/1.62.0
Change-Id: I9d4c1ddb7b7d8f0069217ecc582700f9fda6dd4c Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/asio/ssl/detail/impl/engine.ipp')
-rw-r--r--boost/asio/ssl/detail/impl/engine.ipp12
1 files changed, 5 insertions, 7 deletions
diff --git a/boost/asio/ssl/detail/impl/engine.ipp b/boost/asio/ssl/detail/impl/engine.ipp
index 3fcfd70d8e..f15f2e3800 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-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2016 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)
@@ -203,23 +203,21 @@ const boost::system::error_code& engine::map_error_code(
// If there's data yet to be read, it's an error.
if (BIO_wpending(ext_bio_))
{
- ec = boost::system::error_code(
- ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ),
- boost::asio::error::get_ssl_category());
+ ec = boost::asio::ssl::error::stream_truncated;
return ec;
}
// SSL v2 doesn't provide a protocol-level shutdown, so an eof on the
// underlying transport is passed through.
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
if (ssl_->version == SSL2_VERSION)
return ec;
+#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
// Otherwise, the peer should have negotiated a proper shutdown.
if ((::SSL_get_shutdown(ssl_) & SSL_RECEIVED_SHUTDOWN) == 0)
{
- ec = boost::system::error_code(
- ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ),
- boost::asio::error::get_ssl_category());
+ ec = boost::asio::ssl::error::stream_truncated;
}
return ec;