Chris@16: // Chris@16: // ssl/verify_context.hpp Chris@16: // ~~~~~~~~~~~~~~~~~~~~~~ Chris@16: // Chris@101: // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: Chris@16: #ifndef BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP Chris@16: #define BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP Chris@16: Chris@16: #if defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: # pragma once Chris@16: #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: Chris@16: #include Chris@16: Chris@16: #if !defined(BOOST_ASIO_ENABLE_OLD_SSL) Chris@16: # include Chris@16: # include Chris@16: #endif // !defined(BOOST_ASIO_ENABLE_OLD_SSL) Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace asio { Chris@16: namespace ssl { Chris@16: Chris@16: #if !defined(BOOST_ASIO_ENABLE_OLD_SSL) Chris@16: Chris@16: /// A simple wrapper around the X509_STORE_CTX type, used during verification of Chris@16: /// a peer certificate. Chris@16: /** Chris@16: * @note The verify_context does not own the underlying X509_STORE_CTX object. Chris@16: */ Chris@16: class verify_context Chris@16: : private noncopyable Chris@16: { Chris@16: public: Chris@16: /// The native handle type of the verification context. Chris@16: typedef X509_STORE_CTX* native_handle_type; Chris@16: Chris@16: /// Constructor. Chris@16: explicit verify_context(native_handle_type handle) Chris@16: : handle_(handle) Chris@16: { Chris@16: } Chris@16: Chris@16: /// Get the underlying implementation in the native type. Chris@16: /** Chris@16: * This function may be used to obtain the underlying implementation of the Chris@16: * context. This is intended to allow access to context functionality that is Chris@16: * not otherwise provided. Chris@16: */ Chris@16: native_handle_type native_handle() Chris@16: { Chris@16: return handle_; Chris@16: } Chris@16: Chris@16: private: Chris@16: // The underlying native implementation. Chris@16: native_handle_type handle_; Chris@16: }; Chris@16: Chris@16: #endif // defined(BOOST_ASIO_ENABLE_OLD_SSL) Chris@16: Chris@16: } // namespace ssl Chris@16: } // namespace asio Chris@16: } // namespace boost Chris@16: Chris@16: #include Chris@16: Chris@16: #endif // BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP