From 11e987e30dc946242c0ba1325e032ea690f2e3ae Mon Sep 17 00:00:00 2001 From: allfro Date: Thu, 9 Jul 2015 09:01:39 -0400 Subject: [PATCH] Allow compilation with older openssl Uses `TLSv1_client_method` if `TLSv1_2_client_method` is not defined as a symbol in OpenSSL. --- hydra-mod.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hydra-mod.c b/hydra-mod.c index f8731f0..c79934c 100644 --- a/hydra-mod.c +++ b/hydra-mod.c @@ -479,6 +479,9 @@ int internal__hydra_connect_to_ssl(int socket) { } } else { // if ((sslContext = SSL_CTX_new(SSLv23_client_method())) == NULL) { +#ifndef TLSv1_2_client_method +#define TLSv1_2_client_method TLSv1_client_method +#endif if ((sslContext = SSL_CTX_new(TLSv1_2_client_method())) == NULL) { if (verbose) { err = ERR_get_error();