From: Stuart Henderson Date: Sun, 11 Oct 2015 05:30:33 +0000 (-0700) Subject: Bug 4347: compile errors with LibreSSL 2.3 X-Git-Tag: SQUID_4_0_1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e68e8b9a097642bb8e87ffc2f00f50adb54a267c;p=thirdparty%2Fsquid.git Bug 4347: compile errors with LibreSSL 2.3 --- diff --git a/src/ssl/bio.cc b/src/ssl/bio.cc index f3f2a4059c..d09905f79b 100644 --- a/src/ssl/bio.cc +++ b/src/ssl/bio.cc @@ -1006,7 +1006,11 @@ Ssl::Bio::sslFeatures::parseV3Hello(const unsigned char *messageContainer, size_ ciphers += 2; if (ciphersLen) { - const SSL_METHOD *method = SSLv3_method(); +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + const SSL_METHOD *method = TLS_method(); +#else + const SSL_METHOD *method = SSLv23_method(); +#endif for (size_t i = 0; i < ciphersLen; i += 2) { // each cipher in v3/tls HELLO message is of size 2 const SSL_CIPHER *c = method->get_cipher_by_char((ciphers + i)); @@ -1103,7 +1107,11 @@ Ssl::Bio::sslFeatures::parseV23Hello(const unsigned char *hello, size_t size) return false; if (ciphersLen) { +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + const SSL_METHOD *method = TLS_method(); +#else const SSL_METHOD *method = SSLv23_method(); +#endif for (unsigned int i = 0; i < ciphersLen; i += 3) { // The v2 hello messages cipher has 3 bytes. // The v2 cipher has the first byte not null