]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/asio/include/boost/asio/ssl/verify_context.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / asio / include / boost / asio / ssl / verify_context.hpp
1 //
2 // ssl/verify_context.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
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)
9 //
10
11 #ifndef BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP
12 #define BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP
13
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18 #include <boost/asio/detail/config.hpp>
19
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)
24
25 #include <boost/asio/detail/push_options.hpp>
26
27 namespace boost {
28 namespace asio {
29 namespace ssl {
30
31 #if !defined(BOOST_ASIO_ENABLE_OLD_SSL)
32
33 /// A simple wrapper around the X509_STORE_CTX type, used during verification of
34 /// a peer certificate.
35 /**
36 * @note The verify_context does not own the underlying X509_STORE_CTX object.
37 */
38 class verify_context
39 : private noncopyable
40 {
41 public:
42 /// The native handle type of the verification context.
43 typedef X509_STORE_CTX* native_handle_type;
44
45 /// Constructor.
46 explicit verify_context(native_handle_type handle)
47 : handle_(handle)
48 {
49 }
50
51 /// Get the underlying implementation in the native type.
52 /**
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.
56 */
57 native_handle_type native_handle()
58 {
59 return handle_;
60 }
61
62 private:
63 // The underlying native implementation.
64 native_handle_type handle_;
65 };
66
67 #endif // defined(BOOST_ASIO_ENABLE_OLD_SSL)
68
69 } // namespace ssl
70 } // namespace asio
71 } // namespace boost
72
73 #include <boost/asio/detail/pop_options.hpp>
74
75 #endif // BOOST_ASIO_SSL_VERIFY_CONTEXT_HPP