From 67791ce4a0ae39a79aab22157d587d774190ac61 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 23 May 2014 18:46:03 +0100 Subject: [PATCH] Add OpenSSL version check --- src/src/tls-openssl.c | 5 +++++ src/src/tls.c | 3 +-- 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))) -- 2.30.2