Merge branch 'fixes' into yubo

merge-requests/15/merge
Nuno 3 years ago
commit e5f594f656

2
.gitignore vendored

@ -90,6 +90,7 @@ ylwrap
*.mk *.mk
# Visual Studio garbage # Visual Studio garbage
.vscode/
*.opensdf *.opensdf
UpgradeLog*.XML UpgradeLog*.XML
_UpgradeReport_Files _UpgradeReport_Files
@ -162,6 +163,7 @@ build/*
build-2010/* build-2010/*
build/* build/*
install/* install/*
win-build/
build_* build_*
nel/tools/build_gamedata/configuration/buildsite.py nel/tools/build_gamedata/configuration/buildsite.py

@ -131,13 +131,6 @@ namespace NLWEB
// only use OpenSSL callback if not using Windows SSPI and using OpenSSL backend // only use OpenSSL callback if not using Windows SSPI and using OpenSSL backend
if (useOpenSSLBackend && !(data && data->features & CURL_VERSION_SSPI)) if (useOpenSSLBackend && !(data && data->features & CURL_VERSION_SSPI))
{ {
#ifdef NL_OS_WINDOWS
// load native Windows CA Certs
addCertificatesFrom("CA");
addCertificatesFrom("AuthRoot");
addCertificatesFrom("ROOT");
#endif
isUsingOpenSSLBackend = true; isUsingOpenSSLBackend = true;
} }
else else
@ -179,40 +172,6 @@ namespace NLWEB
return name; return name;
} }
#ifdef NL_OS_WINDOWS
void addCertificatesFrom(LPCSTR root)
{
HCERTSTORE hStore;
PCCERT_CONTEXT pContext = NULL;
X509 *x509;
hStore = CertOpenSystemStore(NULL, root);
if (hStore)
{
while (pContext = CertEnumCertificatesInStore(hStore, pContext))
{
x509 = NULL;
x509 = d2i_X509(NULL, (const unsigned char **)&pContext->pbCertEncoded, pContext->cbCertEncoded);
if (x509)
{
CertEntry entry;
entry.cert = x509;
entry.file = root;
entry.name = getCertName(x509);
CertList.push_back(entry);
}
}
CertFreeCertificateContext(pContext);
CertCloseStore(hStore, 0);
}
// this is called before debug context is set and log ends up in log.log
//nlinfo("Loaded %d certificates from '%s' certificate store", (int)CertList.size(), root);
}
#endif
void addCertificatesFromFile(const std::string &cert) void addCertificatesFromFile(const std::string &cert)
{ {
if (!isInitialized) if (!isInitialized)

Loading…
Cancel
Save