From 2b79bd325e902d0ba371f9495f691269d30e741f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 2 Apr 2016 19:10:36 -0700 Subject: [PATCH] Declaration for verify_x509_cert_chain does not need external linkage. --- Release/include/cpprest/details/x509_cert_utilities.h | 5 +---- Release/src/http/client/x509_cert_utilities.cpp | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Release/include/cpprest/details/x509_cert_utilities.h b/Release/include/cpprest/details/x509_cert_utilities.h index b9e60df880..5cfa561be5 100644 --- a/Release/include/cpprest/details/x509_cert_utilities.h +++ b/Release/include/cpprest/details/x509_cert_utilities.h @@ -25,7 +25,6 @@ #pragma once -#include #include #if defined(__APPLE__) || (defined(ANDROID) || defined(__ANDROID__)) || (defined(_WIN32) && !defined(__cplusplus_winrt) && !defined(_M_ARM) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)) @@ -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. /// -/// Boost.ASIO context get certificate chain from. +/// Boost.ASIO context to get certificate chain from. /// Host name from the URI. /// True if verification passed and server can be trusted, false otherwise. bool verify_cert_chain_platform_specific(boost::asio::ssl::verify_context &verifyCtx, const std::string &hostName); -bool verify_X509_cert_chain(const std::vector &certChain, const std::string &hostName); - }}}} #endif \ No newline at end of file diff --git a/Release/src/http/client/x509_cert_utilities.cpp b/Release/src/http/client/x509_cert_utilities.cpp index fb1496125e..8f92bfa103 100644 --- a/Release/src/http/client/x509_cert_utilities.cpp +++ b/Release/src/http/client/x509_cert_utilities.cpp @@ -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 #if defined(ANDROID) || defined(__ANDROID__) #include @@ -48,6 +49,8 @@ namespace web { namespace http { namespace client { namespace details { +static bool verify_X509_cert_chain(const std::vector &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();