Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:01

0001 //
0002 // ssl/impl/context.hpp
0003 // ~~~~~~~~~~~~~~~~~~~~
0004 //
0005 // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
0006 // Copyright (c) 2005-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0009 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 
0012 #ifndef BOOST_ASIO_SSL_IMPL_CONTEXT_HPP
0013 #define BOOST_ASIO_SSL_IMPL_CONTEXT_HPP
0014 
0015 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0016 # pragma once
0017 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
0018 
0019 #include <boost/asio/detail/config.hpp>
0020 
0021 #include <boost/asio/detail/throw_error.hpp>
0022 
0023 #include <boost/asio/detail/push_options.hpp>
0024 
0025 namespace boost {
0026 namespace asio {
0027 namespace ssl {
0028 
0029 template <typename VerifyCallback>
0030 void context::set_verify_callback(VerifyCallback callback)
0031 {
0032   boost::system::error_code ec;
0033   this->set_verify_callback(callback, ec);
0034   boost::asio::detail::throw_error(ec, "set_verify_callback");
0035 }
0036 
0037 template <typename VerifyCallback>
0038 BOOST_ASIO_SYNC_OP_VOID context::set_verify_callback(
0039     VerifyCallback callback, boost::system::error_code& ec)
0040 {
0041   do_set_verify_callback(
0042       new detail::verify_callback<VerifyCallback>(callback), ec);
0043   BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
0044 }
0045 
0046 template <typename PasswordCallback>
0047 void context::set_password_callback(PasswordCallback callback)
0048 {
0049   boost::system::error_code ec;
0050   this->set_password_callback(callback, ec);
0051   boost::asio::detail::throw_error(ec, "set_password_callback");
0052 }
0053 
0054 template <typename PasswordCallback>
0055 BOOST_ASIO_SYNC_OP_VOID context::set_password_callback(
0056     PasswordCallback callback, boost::system::error_code& ec)
0057 {
0058   do_set_password_callback(
0059       new detail::password_callback<PasswordCallback>(callback), ec);
0060   BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
0061 }
0062 
0063 } // namespace ssl
0064 } // namespace asio
0065 } // namespace boost
0066 
0067 #include <boost/asio/detail/pop_options.hpp>
0068 
0069 #endif // BOOST_ASIO_SSL_IMPL_CONTEXT_HPP