File indexing completed on 2025-01-18 09:29:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP
0012 #define BOOST_ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019
0020 #include <boost/asio/ssl/verify_context.hpp>
0021
0022 #include <boost/asio/detail/push_options.hpp>
0023
0024 namespace boost {
0025 namespace asio {
0026 namespace ssl {
0027 namespace detail {
0028
0029 class verify_callback_base
0030 {
0031 public:
0032 virtual ~verify_callback_base()
0033 {
0034 }
0035
0036 virtual bool call(bool preverified, verify_context& ctx) = 0;
0037 };
0038
0039 template <typename VerifyCallback>
0040 class verify_callback : public verify_callback_base
0041 {
0042 public:
0043 explicit verify_callback(VerifyCallback callback)
0044 : callback_(callback)
0045 {
0046 }
0047
0048 virtual bool call(bool preverified, verify_context& ctx)
0049 {
0050 return callback_(preverified, ctx);
0051 }
0052
0053 private:
0054 VerifyCallback callback_;
0055 };
0056
0057 }
0058 }
0059 }
0060 }
0061
0062 #include <boost/asio/detail/pop_options.hpp>
0063
0064 #endif