-
Notifications
You must be signed in to change notification settings - Fork 211
Closed
Description
PathMatchSpecA is in shlwapi.h, but that entire code is disabled when compiling a Universal Windows application (WinRT/C++):
I noticed that SocketOpenSSL::checkHost() is only used if OPENSSL_VERSION_NUMBER < 0x10100000L, and it's a private method, so not called from anywhere outside of SocketOpenSSL. In my case it's also not being called at all given that the OpenSSL version number is greater than 0x10100000L, so as a work-around, I've just changed it to this:
/**
* Check whether a hostname matches a pattern
*/
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
}
Can you see any issue with doing this?
Metadata
Metadata
Assignees
Labels
No labels


