> On March 7, 2016 at 5:54 PM Muffinman <[email protected]> wrote:
>
>
> Hello all,
>
> I'm trying to compile dovecot 2.2.21 on OS-X 10.11.3 and I'm running a
> bit of trouble with OpenSSL. I've cloned OpenSSL (OpenSSL
> 1.1.0-pre4-dev) from github and in openssl/ssl.h SSL_TXT_SSLV2 is not
> defined anymore. Compilation fails with:
>
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib
> -I../../src/lib-test -DMODULE_DIR=\"/usr/local/lib/dovecot\" -std=gnu99
> -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations
> -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
> -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -MT
> iostream-openssl-common.lo -MD -MP -MF .deps/iostream-openssl-common.Tpo
> -c iostream-openssl-common.c -fno-common -DPIC -o
> .libs/iostream-openssl-common.o
> iostream-openssl-common.c:34:24: error: use of undeclared identifier
> 'SSL_TXT_SSLV2'
> if (strcasecmp(name, SSL_TXT_SSLV2) == 0)
> ^
> 1 error generated.
> make[3]: *** [iostream-openssl-common.lo] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> In openssl/ssl.h the following is defined:
>
> # define SSL_TXT_SSLV3 "SSLv3"
> # define SSL_TXT_TLSV1 "TLSv1"
> # define SSL_TXT_TLSV1_1 "TLSv1.1"
> # define SSL_TXT_TLSV1_2 "TLSv1.2"
>
> # define SSL_TXT_ALL "ALL"
>
> Any suggestions on how to fix this?
>
> Kind regards, Maarten
Hi!
Can you try the attached patch?
---
Aki Tuomi
Dovecot oy
From 23b46652f29ef7ddb77bd0ec2bdc444b58f690b0 Mon Sep 17 00:00:00 2001
From: Aki Tuomi <[email protected]>
Date: Mon, 7 Mar 2016 18:08:14 +0200
Subject: [PATCH] lib-ssl-iostream: Make SSLv2 conditional
---
src/lib-ssl-iostream/iostream-openssl-common.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/lib-ssl-iostream/iostream-openssl-common.c b/src/lib-ssl-iostream/iostream-openssl-common.c
index cbdbc44..4d04d5b 100644
--- a/src/lib-ssl-iostream/iostream-openssl-common.c
+++ b/src/lib-ssl-iostream/iostream-openssl-common.c
@@ -31,10 +31,15 @@ int openssl_get_protocol_options(const char *protocols)
name++;
neg = TRUE;
}
+
+#ifdef SSL_TXT_SSLV2
if (strcasecmp(name, SSL_TXT_SSLV2) == 0)
proto = DOVECOT_SSL_PROTO_SSLv2;
else if (strcasecmp(name, SSL_TXT_SSLV3) == 0)
+#else
+ if (strcasecmp(name, SSL_TXT_SSLV3) == 0)
proto = DOVECOT_SSL_PROTO_SSLv3;
+#endif
else if (strcasecmp(name, SSL_TXT_TLSV1) == 0)
proto = DOVECOT_SSL_PROTO_TLSv1;
#ifdef SSL_TXT_TLSV1_1
--
1.9.1