PageRenderTime 24ms CodeModel.GetById 12ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/asio/ssl/impl/context.hpp

http://hadesmem.googlecode.com/
C++ Header | 73 lines | 48 code | 15 blank | 10 comment | 1 complexity | 938d1fed1d758f0d94c97781e8866d5d MD5 | raw file
 1//
 2// ssl/impl/context.hpp
 3// ~~~~~~~~~~~~~~~~~~~~
 4//
 5// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
 6// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 7//
 8// Distributed under the Boost Software License, Version 1.0. (See accompanying
 9// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10//
11
12#ifndef BOOST_ASIO_SSL_IMPL_CONTEXT_HPP
13#define BOOST_ASIO_SSL_IMPL_CONTEXT_HPP
14
15#if defined(_MSC_VER) && (_MSC_VER >= 1200)
16# pragma once
17#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18
19#include <boost/asio/detail/config.hpp>
20
21#if !defined(BOOST_ASIO_ENABLE_OLD_SSL)
22# include <boost/asio/detail/throw_error.hpp>
23#endif // !defined(BOOST_ASIO_ENABLE_OLD_SSL)
24
25#include <boost/asio/detail/push_options.hpp>
26
27namespace boost {
28namespace asio {
29namespace ssl {
30
31#if !defined(BOOST_ASIO_ENABLE_OLD_SSL)
32
33template <typename VerifyCallback>
34void context::set_verify_callback(VerifyCallback callback)
35{
36  boost::system::error_code ec;
37  this->set_verify_callback(callback, ec);
38  boost::asio::detail::throw_error(ec, "set_verify_callback");
39}
40
41template <typename VerifyCallback>
42boost::system::error_code context::set_verify_callback(
43    VerifyCallback callback, boost::system::error_code& ec)
44{
45  return do_set_verify_callback(
46      new detail::verify_callback<VerifyCallback>(callback), ec);
47}
48
49template <typename PasswordCallback>
50void context::set_password_callback(PasswordCallback callback)
51{
52  boost::system::error_code ec;
53  this->set_password_callback(callback, ec);
54  boost::asio::detail::throw_error(ec, "set_password_callback");
55}
56
57template <typename PasswordCallback>
58boost::system::error_code context::set_password_callback(
59    PasswordCallback callback, boost::system::error_code& ec)
60{
61  return do_set_password_callback(
62      new detail::password_callback<PasswordCallback>(callback), ec);
63}
64
65#endif // !defined(BOOST_ASIO_ENABLE_OLD_SSL)
66
67} // namespace ssl
68} // namespace asio
69} // namespace boost
70
71#include <boost/asio/detail/pop_options.hpp>
72
73#endif // BOOST_ASIO_SSL_IMPL_CONTEXT_HPP