summaryrefslogtreecommitdiff
path: root/boost/asio/ssl/impl
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/ssl/impl')
-rw-r--r--boost/asio/ssl/impl/context.hpp2
-rw-r--r--boost/asio/ssl/impl/context.ipp21
-rw-r--r--boost/asio/ssl/impl/error.ipp2
-rw-r--r--boost/asio/ssl/impl/rfc2818_verification.ipp2
-rw-r--r--boost/asio/ssl/impl/src.hpp2
5 files changed, 16 insertions, 13 deletions
diff --git a/boost/asio/ssl/impl/context.hpp b/boost/asio/ssl/impl/context.hpp
index a207a73fa7..8f016830f9 100644
--- a/boost/asio/ssl/impl/context.hpp
+++ b/boost/asio/ssl/impl/context.hpp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2018 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/impl/context.ipp b/boost/asio/ssl/impl/context.ipp
index f50ce454ea..f35e43c2a6 100644
--- a/boost/asio/ssl/impl/context.ipp
+++ b/boost/asio/ssl/impl/context.ipp
@@ -3,7 +3,7 @@
// ~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2005-2018 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)
@@ -510,23 +510,26 @@ BOOST_ASIO_SYNC_OP_VOID context::add_certificate_authority(
bio_cleanup bio = { make_buffer_bio(ca) };
if (bio.p)
{
- x509_cleanup cert = { ::PEM_read_bio_X509(bio.p, 0, 0, 0) };
- if (cert.p)
+ if (X509_STORE* store = ::SSL_CTX_get_cert_store(handle_))
{
- if (X509_STORE* store = ::SSL_CTX_get_cert_store(handle_))
+ for (;;)
{
- if (::X509_STORE_add_cert(store, cert.p) == 1)
+ x509_cleanup cert = { ::PEM_read_bio_X509(bio.p, 0, 0, 0) };
+ if (!cert.p)
+ break;
+
+ if (::X509_STORE_add_cert(store, cert.p) != 1)
{
- ec = boost::system::error_code();
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
}
}
}
}
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
+ ec = boost::system::error_code();
BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
}
diff --git a/boost/asio/ssl/impl/error.ipp b/boost/asio/ssl/impl/error.ipp
index bdbd836f3b..a359619765 100644
--- a/boost/asio/ssl/impl/error.ipp
+++ b/boost/asio/ssl/impl/error.ipp
@@ -2,7 +2,7 @@
// ssl/impl/error.ipp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2018 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/impl/rfc2818_verification.ipp b/boost/asio/ssl/impl/rfc2818_verification.ipp
index d759ce567c..63ce663bdc 100644
--- a/boost/asio/ssl/impl/rfc2818_verification.ipp
+++ b/boost/asio/ssl/impl/rfc2818_verification.ipp
@@ -2,7 +2,7 @@
// ssl/impl/rfc2818_verification.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2018 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/impl/src.hpp b/boost/asio/ssl/impl/src.hpp
index 942cc32308..2e8859ea2b 100644
--- a/boost/asio/ssl/impl/src.hpp
+++ b/boost/asio/ssl/impl/src.hpp
@@ -2,7 +2,7 @@
// impl/ssl/src.hpp
// ~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2018 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)