[exim-cvs] Fix feature-ifdef for OpenSSL builtin certname ch…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Exim Git Commits Mailing List
Data:  
Para: exim-cvs
Assunto: [exim-cvs] Fix feature-ifdef for OpenSSL builtin certname checking
Gitweb: http://git.exim.org/exim.git/commitdiff/2dfb468b976206b91ff0677da1374dc78e5503e2
Commit:     2dfb468b976206b91ff0677da1374dc78e5503e2
Parent:     a7a86fd88cc858015a6bad9e1a39be0070a6e4ea
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Oct 26 17:15:20 2014 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Oct 26 17:15:20 2014 +0000


    Fix feature-ifdef for OpenSSL builtin certname checking
---
 src/src/tls-openssl.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 4de3cad..25d5232 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -38,6 +38,13 @@ functions from the OpenSSL library. */
 #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
 # define EXIM_HAVE_OPENSSL_TLSEXT
 #endif
+#if OPENSSL_VERSION_NUMBER >= 0x010100000L
+# define EXIM_HAVE_OPENSSL_CHECKHOST
+#endif
+#if OPENSSL_VERSION_NUMBER >= 0x010000000L \
+    && (OPENSSL_VERSION_NUMBER & 0x0000ff000L) >= 0x000002000L
+# define EXIM_HAVE_OPENSSL_CHECKHOST
+#endif


 #if !defined(EXIM_HAVE_OPENSSL_TLSEXT) && !defined(DISABLE_OCSP)
 # warning "OpenSSL library version too old; define DISABLE_OCSP in Makefile"
@@ -355,7 +362,7 @@ else
      && ((verify_cert_hostnames = client_static_cbinfo->verify_cert_hostnames)))
          /* client, wanting hostname check */


-# if OPENSSL_VERSION_NUMBER >= 0x010100000L || OPENSSL_VERSION_NUMBER >= 0x010002000L
+# if EXIM_HAVE_OPENSSL_CHECKHOST
# ifndef X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS
# define X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS 0
# endif