Skip to content

Commit

Permalink
Fix C++/WinRT compile issue (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
rh101 authored Nov 15, 2023
1 parent f29906c commit 3b66efb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ixwebsocket/IXSocketOpenSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#ifdef _WIN32
// For manipulating the certificate store
#include <windows.h>
#include <wincrypt.h>
#endif

Expand Down Expand Up @@ -293,10 +294,16 @@ namespace ix
*/
bool SocketOpenSSL::checkHost(const std::string& host, const char* pattern)
{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
return true;
#else

#ifdef _WIN32
return PathMatchSpecA(host.c_str(), pattern);
#else
return fnmatch(pattern, host.c_str(), 0) != FNM_NOMATCH;
#endif

#endif
}

Expand Down

0 comments on commit 3b66efb

Please sign in to comment.