Realistic 3D camera system
3D camera system components
rfc2818_verification.hpp
Go to the documentation of this file.
1 //
2 // ssl/rfc2818_verification.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 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 ASIO_SSL_RFC2818_VERIFICATION_HPP
12 #define ASIO_SSL_RFC2818_VERIFICATION_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
19 
20 #if !defined(ASIO_ENABLE_OLD_SSL)
21 # include <string>
24 #endif // !defined(ASIO_ENABLE_OLD_SSL)
25 
27 
28 namespace asio {
29 namespace ssl {
30 
31 #if !defined(ASIO_ENABLE_OLD_SSL)
32 
35 
65 {
66 public:
68  typedef bool result_type;
69 
71  explicit rfc2818_verification(const std::string& host)
72  : host_(host)
73  {
74  }
75 
77  ASIO_DECL bool operator()(bool preverified, verify_context& ctx) const;
78 
79 private:
80  // Helper function to check a host name against a pattern.
81  ASIO_DECL static bool match_pattern(const char* pattern,
82  std::size_t pattern_length, const char* host);
83 
84  // Helper function to check a host name against an IPv4 address
85  // The host name to be checked.
86  std::string host_;
87 };
88 
89 #endif // defined(ASIO_ENABLE_OLD_SSL)
90 
91 } // namespace ssl
92 } // namespace asio
93 
95 
96 #if defined(ASIO_HEADER_ONLY)
98 #endif // defined(ASIO_HEADER_ONLY)
99 
100 #endif // ASIO_SSL_RFC2818_VERIFICATION_HPP
ASIO_DECL bool operator()(bool preverified, verify_context &ctx) const
Perform certificate verification.
rfc2818_verification(const std::string &host)
Constructor.
#define ASIO_DECL
Definition: config.hpp:43
bool result_type
The type of the function object&#39;s result.