C++ Rest SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
x509_cert_utilities.h
1 /***
2 * ==++==
3 *
4 * Copyright (c) Microsoft Corporation. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * ==--==
17 * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
18 *
19 * Contains utility functions for helping to verify server certificates in OS X/iOS and Android.
20 *
21 * For the latest on this and related APIs, please see http://casablanca.codeplex.com.
22 *
23 * =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
24 ****/
25 
26 #pragma once
27 
28 #include <vector>
29 #include <string>
30 
31 #if defined(__APPLE__) || (defined(ANDROID) || defined(__ANDROID__)) || (defined(_WIN32) && !defined(__cplusplus_winrt) && !defined(_M_ARM) && !defined(CPPREST_EXCLUDE_WEBSOCKETS))
32 
33 #if defined(_MSC_VER)
34 #pragma warning(push)
35 #pragma warning(disable : 4005)
36 #endif
37 #if defined(__clang__)
38 #pragma clang diagnostic push
39 #pragma clang diagnostic ignored "-Wunused-local-typedef"
40 #endif
41 #include <boost/asio/ssl.hpp>
42 #if defined(__clang__)
43 #pragma clang diagnostic pop
44 #endif
45 #if defined(_MSC_VER)
46 #pragma warning(pop)
47 #endif
48 
49 namespace web { namespace http { namespace client { namespace details {
50 
58 bool verify_cert_chain_platform_specific(boost::asio::ssl::verify_context &verifyCtx, const std::string &hostName);
59 
60 bool verify_X509_cert_chain(const std::vector<std::string> &certChain, const std::string &hostName);
61 
62 }}}}
63 
64 #endif
The web namespace contains functionality common to multiple protocols like HTTP and WebSockets...
Definition: base_uri.h:37