summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2014-05-23 18:46:03 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2014-05-23 18:46:03 +0100
commit67791ce4a0ae39a79aab22157d587d774190ac61 (patch)
treec5537cdbd71c433062b06c2de22bb52e4cfebcb7
parent7e07527a6a3e003d70029baf78977219a3369507 (diff)
Add OpenSSL version check
-rw-r--r--src/src/tls-openssl.c5
-rw-r--r--src/src/tls.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 05af3db88..bcca506e0 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -35,6 +35,11 @@ functions from the OpenSSL library. */
# define EXIM_HAVE_OPENSSL_TLSEXT
#endif
+#if !defined(EXIM_HAVE_OPENSSL_TLSEXT) && !defined(DISABLE_OCSP)
+# warning "OpenSSL library version too old; define DISABLE_OCSP in Makefile"
+# define DISABLE_OCSP
+#endif
+
/* Structure for collecting random data for seeding. */
typedef struct randstuff {
diff --git a/src/src/tls.c b/src/src/tls.c
index cb7efffe9..f2ab56706 100644
--- a/src/src/tls.c
+++ b/src/src/tls.c
@@ -313,10 +313,9 @@ if ((altnames = tls_cert_subject_altname(cert, US"dns")))
else if ((subjdn = tls_cert_subject(cert, NULL)))
{
int sn_sep = ',';
- uschar * sn;
dn_to_list(subjdn);
- while (cmpname = string_nextinlist(&namelist, &cmp_sep, NULL, 0))
+ while ((cmpname = string_nextinlist(&namelist, &cmp_sep, NULL, 0)))
{
uschar * sn = subjdn;
while ((certname = string_nextinlist(&sn, &sn_sep, NULL, 0)))