Skip to contentSkip to conversation

config-msvc.h: fix OpenSSL-related defines

PATCH In review Lev Stipakov 2 participants 2 messages Oct 13, 2021 – Oct 14, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 config-msvc.h: fix OpenSSL-related defines

From: Lev Stipakov <[email protected]...>

Commit 2778443 ("msvc: OpenSSL 1.1.x support") added OpenSSL-related defines to config-msvc.h, which in Linux/MinGW are set during configure step.

Turns out that OPENSSL_NO_EC was added by mistake - it breaks loading EC keys. Also few others were missing.

Compare with MinGW-generated config.h, which uses the same OpenSSL version. Remove unneeded defines and add missing ones.

---
 config-msvc.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
config-msvc.h +5 -2
index f199bb2c..a39eeed8 100644
@@ -84,13 +84,16 @@
 #define HAVE_HMAC_CTX_NEW 1
 #define HAVE_SSL_CTX_GET_DEFAULT_PASSWD_CB_USERDATA 1
 #define HAVE_SSL_CTX_GET_DEFAULT_PASSWD_CB 1
+#define HAVE_SSL_CTX_NEW 1
+#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1
 #define HAVE_X509_GET0_PUBKEY 1
 #define HAVE_X509_STORE_GET0_OBJECTS 1
 #define HAVE_X509_OBJECT_FREE 1
 #define HAVE_X509_OBJECT_GET_TYPE 1
+#define HAVE_X509_GET0_NOTAFTER 1
+#define HAVE_X509_GET0_NOTBEFORE 1
 #define HAVE_EVP_PKEY_GET0_RSA 1
 #define HAVE_EVP_PKEY_GET0_EC_KEY 1
-#define HAVE_EVP_PKEY_ID 1
 #define HAVE_EVP_PKEY_GET0_DSA 1
 #define HAVE_RSA_SET_FLAGS 1
 #define HAVE_RSA_GET0_KEY 1
@@ -110,8 +113,8 @@
 #define HAVE_RSA_METH_SET0_APP_DATA 1
 #define HAVE_RSA_METH_GET0_APP_DATA 1
 #define HAVE_EC_GROUP_ORDER_BITS 1
-#define OPENSSL_NO_EC 1
 #define HAVE_EVP_CIPHER_CTX_RESET 1
+
 #define HAVE_DIINSTALLDEVICE 1
 
 #define PATH_SEPARATOR     '\\'
Signature · 1 line
2.23.0.windows.1
Acked-by on v1 3/3
#1 lore raw

Thanks for diving into this. I expect we'll need to do a cleanup of config-msvc.h for master as well - but the file is different enough that this patch does not apply.

Your patch has been applied to the release/2.5 branch.

commit c93fcb75782f44a3feb9dba2292a891e579adac4

Author: Lev Stipakov
Date:   Thu Oct 14 02:04:42 2021 +0300
     config-msvc.h: fix OpenSSL-related defines

     Signed-off-by: Lev Stipakov <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg22933.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering