[Openvpn-devel,3/3] config-msvc.h: fix OpenSSL-related defines

Message ID 20211013230442.305-1-lstipakov@gmail.com
State Accepted
Headers show
Series
  • [Openvpn-devel,1/3] msvc: fix product version display
Related show

Commit Message

Lev Stipakov Oct. 13, 2021, 11:04 p.m.
From: Lev Stipakov <lev@openvpn.net>

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.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
---
 config-msvc.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Gert Doering Oct. 14, 2021, 2:34 p.m. | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

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 <lev@openvpn.net>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20211013230442.305-1-lstipakov@gmail.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22933.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/config-msvc.h b/config-msvc.h
index f199bb2c..a39eeed8 100644
--- a/config-msvc.h
+++ b/config-msvc.h
@@ -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     '\\'