nail: fix build against OpenSSL with disabled SSLv3

Extend the existing patch handling disabled SSLv2 to cover the SSLv3 case as
well in order to fix the following build error reported by the buildbot:

    openssl.o: In function `ssl_open':
    openssl.c:(.text+0xa1c): undefined reference to `SSLv3_client_method'
    collect2: error: ld returned 1 exit status

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich
2017-01-18 04:03:00 +01:00
parent 12df5439b8
commit a642b4d371
2 changed files with 9 additions and 3 deletions
@@ -0,0 +1,22 @@
--- a/openssl.c
+++ b/openssl.c
@@ -216,11 +216,17 @@ ssl_select_method(const char *uhp)
cp = ssl_method_string(uhp);
if (cp != NULL) {
+#ifndef OPENSSL_NO_SSL2
if (equal(cp, "ssl2"))
method = SSLv2_client_method();
- else if (equal(cp, "ssl3"))
+ else
+#endif
+#ifndef OPENSSL_NO_SSL3
+ if (equal(cp, "ssl3"))
method = SSLv3_client_method();
- else if (equal(cp, "tls1"))
+ else
+#endif
+ if (equal(cp, "tls1"))
method = TLSv1_client_method();
else {
fprintf(stderr, catgets(catd, CATSET, 244,