Skip to content

Commit

Permalink
Declaration for verify_x509_cert_chain does not need external linkage.
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219 authored and ras0219-msft committed Apr 8, 2016
1 parent dac2c16 commit 2b79bd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Release/include/cpprest/details/x509_cert_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#pragma once

#include <vector>
#include <string>

#if defined(__APPLE__) || (defined(ANDROID) || defined(__ANDROID__)) || (defined(_WIN32) && !defined(__cplusplus_winrt) && !defined(_M_ARM) && !defined(CPPREST_EXCLUDE_WEBSOCKETS))
Expand All @@ -52,13 +51,11 @@ namespace web { namespace http { namespace client { namespace details {
/// Using platform specific APIs verifies server certificate.
/// Currently implemented to work on iOS, Android, and OS X.
/// </summary>
/// <param name="verifyCtx">Boost.ASIO context get certificate chain from.</param>
/// <param name="verifyCtx">Boost.ASIO context to get certificate chain from.</param>
/// <param name="hostName">Host name from the URI.</param>
/// <returns>True if verification passed and server can be trusted, false otherwise.</returns>
bool verify_cert_chain_platform_specific(boost::asio::ssl::verify_context &verifyCtx, const std::string &hostName);

bool verify_X509_cert_chain(const std::vector<std::string> &certChain, const std::string &hostName);

}}}}

#endif
3 changes: 3 additions & 0 deletions Release/src/http/client/x509_cert_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#if defined(__APPLE__) || (defined(ANDROID) || defined(__ANDROID__)) || (defined(_WIN32) && !defined(__cplusplus_winrt) && !defined(_M_ARM) && !defined(CPPREST_EXCLUDE_WEBSOCKETS))

#include "cpprest/details/x509_cert_utilities.h"
#include <vector>

#if defined(ANDROID) || defined(__ANDROID__)
#include <jni.h>
Expand All @@ -48,6 +49,8 @@

namespace web { namespace http { namespace client { namespace details {

static bool verify_X509_cert_chain(const std::vector<std::string> &certChain, const std::string &hostName);

bool verify_cert_chain_platform_specific(boost::asio::ssl::verify_context &verifyCtx, const std::string &hostName)
{
X509_STORE_CTX *storeContext = verifyCtx.native_handle();
Expand Down

0 comments on commit 2b79bd3

Please sign in to comment.