Skip to content

Commit 09239bb

Browse files
committed
Updating to websocketpp implementation to always use std::error_code, and adding macros to avoid x509 utilities on ARM.
1 parent 670c1a9 commit 09239bb

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Release/include/cpprest/x509_cert_utilities.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <vector>
3131
#include <string>
3232

33-
#if defined(__APPLE__) || defined(ANDROID) || (defined(_MS_WINDOWS) && !defined(__cplusplus_winrt))
33+
#if defined(__APPLE__) || defined(ANDROID) || (defined(_MS_WINDOWS) && !defined(__cplusplus_winrt) && !defined(_M_ARM))
3434

3535
#include <boost/asio/ssl.hpp>
3636

Release/src/http/client/x509_cert_utilities.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ using namespace crossplat;
5050

5151
namespace web { namespace http { namespace client { namespace details {
5252

53-
#if defined(__APPLE__) || defined(ANDROID) || (defined(_MS_WINDOWS) && !defined(__cplusplus_winrt))
53+
#if defined(__APPLE__) || defined(ANDROID) || (defined(_MS_WINDOWS) && !defined(__cplusplus_winrt) && !defined(_M_ARM))
5454
bool verify_cert_chain_platform_specific(boost::asio::ssl::verify_context &verifyCtx, const std::string &hostName)
5555
{
5656
X509_STORE_CTX *storeContext = verifyCtx.native_handle();
@@ -106,7 +106,7 @@ bool verify_cert_chain_platform_specific(boost::asio::ssl::verify_context &verif
106106
}
107107
#endif
108108

109-
#if defined(_MS_WINDOWS) && !defined(__cplusplus_winrt)
109+
#if defined(_MS_WINDOWS) && !defined(__cplusplus_winrt) && !defined(_M_ARM)
110110

111111
// Helper RAII unique_ptrs to free Windows structures.
112112
struct cert_free_certificate_context

Release/src/websockets/client/ws_client.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
#include <memory>
3535
#include <thread>
3636

37+
// Force websocketpp to use C++ std::error_code instead of Boost.
38+
#define _WEBSOCKETPP_CPP11_SYSTEM_ERROR_
39+
3740
#if ((!defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) && !defined(_M_ARM) && (!defined(_MSC_VER) || (_MSC_VER < 1900))) && !defined(CPPREST_EXCLUDE_WEBSOCKETS)
3841
#if defined(__GNUC__)
3942
#include "pplx/threadpool.h"
@@ -49,7 +52,6 @@
4952
#undef ntohll
5053
#undef htonll
5154
#endif
52-
#define _WEBSOCKETPP_CPP11_SYSTEM_ERROR_
5355
#include <websocketpp/config/asio_client.hpp>
5456
#include <websocketpp/config/asio_no_tls_client.hpp>
5557
#include <websocketpp/client.hpp>

0 commit comments

Comments
 (0)