|
| 1 | +From 29b6437d9b2675edc77df94baa9004442e22f469 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Christoph Reiter <reiter.christoph@gmail.com> |
| 3 | +Date: Fri, 28 Sep 2018 00:00:00 +0000 |
| 4 | +Subject: [PATCH 1/2] Disable cert store integration if OPENSSL_VERSION_NUMBER |
| 5 | + < 0x10100000L |
| 6 | + |
| 7 | +--- |
| 8 | + src/http.c | 2 ++ |
| 9 | + src/wincerts.c | 3 +++ |
| 10 | + 2 files changed, 5 insertions(+) |
| 11 | + |
| 12 | +diff --git a/src/http.c b/src/http.c |
| 13 | +index 19ae4b1..45329e4 100644 |
| 14 | +--- a/src/http.c |
| 15 | ++++ b/src/http.c |
| 16 | +@@ -327,10 +327,12 @@ static int op_poll_win32(struct pollfd *_fds,nfds_t _nfds,int _timeout){ |
| 17 | + typedef ptrdiff_t ssize_t; |
| 18 | + # endif |
| 19 | + |
| 20 | ++#if OPENSSL_VERSION_NUMBER < 0x10100000L |
| 21 | + /*Load certificates from the built-in certificate store.*/ |
| 22 | + int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx); |
| 23 | + # define SSL_CTX_set_default_verify_paths \ |
| 24 | + SSL_CTX_set_default_verify_paths_win32 |
| 25 | ++#endif |
| 26 | + |
| 27 | + # else |
| 28 | + /*Normal Berkeley sockets.*/ |
| 29 | +diff --git a/src/wincerts.c b/src/wincerts.c |
| 30 | +index 7f915bd..78b9cc8 100644 |
| 31 | +--- a/src/wincerts.c |
| 32 | ++++ b/src/wincerts.c |
| 33 | +@@ -33,6 +33,8 @@ |
| 34 | + # include <openssl/err.h> |
| 35 | + # include <openssl/x509.h> |
| 36 | + |
| 37 | ++#if OPENSSL_VERSION_NUMBER < 0x10100000L |
| 38 | ++ |
| 39 | + static int op_capi_new(X509_LOOKUP *_lu){ |
| 40 | + HCERTSTORE h_store; |
| 41 | + h_store=CertOpenStore(CERT_STORE_PROV_SYSTEM_A,0,0, |
| 42 | +@@ -171,3 +173,4 @@ int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx){ |
| 43 | + } |
| 44 | + |
| 45 | + #endif |
| 46 | ++#endif |
| 47 | +-- |
| 48 | +2.20.1 |
| 49 | + |
0 commit comments