diff options
-rw-r--r-- | neon/neon.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/neon/neon.patch b/neon/neon.patch index 21e66d9a2a7a..95d6b55024b3 100644 --- a/neon/neon.patch +++ b/neon/neon.patch @@ -373,3 +373,51 @@ /* Returns non-zero if library is built with support for the given * NE_FEATURE_* feature code 'code'. */ +--- src/ne_openssl.c ++++ src/ne_openssl.c +@@ -41,6 +41,13 @@ + #include <pthread.h> + #endif + ++#ifdef WIN32 ++#define X509_NAME WIN32_X509_NAME ++#include <windows.h> ++#include <wincrypt.h> ++#undef X509_NAME ++#endif ++ + #include "ne_ssl.h" + #include "ne_string.h" + #include "ne_session.h" +@@ -798,6 +798,31 @@ + X509_STORE_load_locations(store, NE_SSL_CA_BUNDLE, NULL); + #else + X509_STORE_set_default_paths(store); ++#ifdef WIN32 ++ { ++ HCERTSTORE hStore; ++ PCCERT_CONTEXT pContext = NULL; ++ X509 *x509; ++ ++ hStore = CertOpenSystemStore(0, "ROOT"); ++ if (hStore) ++ { ++ while (pContext = CertEnumCertificatesInStore(hStore, pContext)) ++ { ++ x509 = d2i_X509(NULL, &pContext->pbCertEncoded, pContext->cbCertEncoded); ++ if (x509) ++ { ++ X509_STORE_add_cert(store, x509); ++ X509_free(x509); ++ } ++ } ++ } ++ ++ CertFreeCertificateContext(pContext); ++ CertCloseStore(hStore, 0); ++ } ++#endif ++ + #endif + } + |