Skip to content

Commit 2b79bd3

Browse files
ras0219ras0219-msft
authored andcommitted
Declaration for verify_x509_cert_chain does not need external linkage.
1 parent dac2c16 commit 2b79bd3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Release/include/cpprest/details/x509_cert_utilities.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
#pragma once
2727

28-
#include <vector>
2928
#include <string>
3029

3130
#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 {
5251
/// Using platform specific APIs verifies server certificate.
5352
/// Currently implemented to work on iOS, Android, and OS X.
5453
/// </summary>
55-
/// <param name="verifyCtx">Boost.ASIO context get certificate chain from.</param>
54+
/// <param name="verifyCtx">Boost.ASIO context to get certificate chain from.</param>
5655
/// <param name="hostName">Host name from the URI.</param>
5756
/// <returns>True if verification passed and server can be trusted, false otherwise.</returns>
5857
bool verify_cert_chain_platform_specific(boost::asio::ssl::verify_context &verifyCtx, const std::string &hostName);
5958

60-
bool verify_X509_cert_chain(const std::vector<std::string> &certChain, const std::string &hostName);
61-
6259
}}}}
6360

6461
#endif

Release/src/http/client/x509_cert_utilities.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#if defined(__APPLE__) || (defined(ANDROID) || defined(__ANDROID__)) || (defined(_WIN32) && !defined(__cplusplus_winrt) && !defined(_M_ARM) && !defined(CPPREST_EXCLUDE_WEBSOCKETS))
2929

3030
#include "cpprest/details/x509_cert_utilities.h"
31+
#include <vector>
3132

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

4950
namespace web { namespace http { namespace client { namespace details {
5051

52+
static bool verify_X509_cert_chain(const std::vector<std::string> &certChain, const std::string &hostName);
53+
5154
bool verify_cert_chain_platform_specific(boost::asio::ssl::verify_context &verifyCtx, const std::string &hostName)
5255
{
5356
X509_STORE_CTX *storeContext = verifyCtx.native_handle();

0 commit comments

Comments
 (0)