]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4347: compile errors with LibreSSL 2.3
authorStuart Henderson <stu@spacehopper.org>
Sun, 11 Oct 2015 05:30:33 +0000 (22:30 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 11 Oct 2015 05:30:33 +0000 (22:30 -0700)
src/ssl/bio.cc

index f3f2a4059c9705f9b54aadf0d70a825093c1f27e..d09905f79be65e410b57fa0e06e70577af27a295 100644 (file)
@@ -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