2 // ssl/verify_context.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP
12 #define BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/config.hpp>
20 #if !defined(BOOST_ASIO_ENABLE_OLD_SSL)
21 # include <boost/asio/detail/noncopyable.hpp>
22 # include <boost/asio/ssl/detail/openssl_types.hpp>
23 #endif // !defined(BOOST_ASIO_ENABLE_OLD_SSL)
25 #include <boost/asio/detail/push_options.hpp>
31 #if !defined(BOOST_ASIO_ENABLE_OLD_SSL)
33 /// A simple wrapper around the X509_STORE_CTX type, used during verification of
34 /// a peer certificate.
36 * @note The verify_context does not own the underlying X509_STORE_CTX object.
42 /// The native handle type of the verification context.
43 typedef X509_STORE_CTX* native_handle_type;
46 explicit verify_context(native_handle_type handle)
51 /// Get the underlying implementation in the native type.
53 * This function may be used to obtain the underlying implementation of the
54 * context. This is intended to allow access to context functionality that is
55 * not otherwise provided.
57 native_handle_type native_handle()
63 // The underlying native implementation.
64 native_handle_type handle_;
67 #endif // defined(BOOST_ASIO_ENABLE_OLD_SSL)
73 #include <boost/asio/detail/pop_options.hpp>
75 #endif // BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP