Removed
Link Here
|
1 |
qca-ossl: Fix build without SSLv3 |
2 |
http://quickgit.kde.org/?p=qca.git&a=commit&h=20a587d77636186edb044cd2b71d6d90fe98d232 |
3 |
|
4 |
This fixes building with LibreSSL >= 2.3.0 which has removed support |
5 |
for SSLv3 completely. As far as I know OpenSSL can be configured to |
6 |
build without it, so it might be helpful there as well. |
7 |
|
8 |
REVIEW: 125386 |
9 |
|
10 |
qca-ossl: Fix build without support for SHA-0 |
11 |
https://quickgit.kde.org/?p=qca.git&a=commit&h=0dbed8eb38afd1561907a52283091c37e7b85156 |
12 |
|
13 |
LibreSSL >= 2.3.0 removed support for SHA-0, so there's no EVP_sha |
14 |
anymore. |
15 |
Wikipedia says about SHA-0: "160-bit hash function published in 1993 |
16 |
under the name SHA. It was withdrawn shortly after publication due to |
17 |
an undisclosed "significant flaw" and replaced by the slightly revised |
18 |
version SHA-1.' |
19 |
|
20 |
REVIEW: 125387 |
21 |
|
22 |
Also includes: |
23 |
qca-ossl: Remove SHA0 from all_hash_types() when it is not available. |
24 |
https://git.reviewboard.kde.org/r/128700/ |
25 |
|
26 |
--- plugins/qca-ossl/qca-ossl.cpp.orig 2015-10-02 09:39:21 UTC |
27 |
+++ plugins/qca-ossl/qca-ossl.cpp |
28 |
@@ -5403,9 +5403,11 @@ public: |
29 |
ctx = SSL_CTX_new(SSLv2_client_method()); |
30 |
break; |
31 |
#endif |
32 |
+#ifndef OPENSSL_NO_SSL3_METHOD |
33 |
case TLS::SSL_v3: |
34 |
ctx = SSL_CTX_new(SSLv3_client_method()); |
35 |
break; |
36 |
+#endif |
37 |
case TLS::TLS_v1: |
38 |
ctx = SSL_CTX_new(TLSv1_client_method()); |
39 |
break; |
40 |
@@ -5805,7 +5807,11 @@ public: |
41 |
{ |
42 |
SessionInfo sessInfo; |
43 |
|
44 |
- sessInfo.isCompressed = (0 != SSL_SESSION_get_compress_id(ssl->session)); |
45 |
+#ifndef OPENSSL_NO_COMP |
46 |
+ sessInfo.isCompressed = (0 != ssl->session->compress_meth); |
47 |
+#else |
48 |
+ sessInfo.isCompressed = 0; |
49 |
+#endif |
50 |
|
51 |
if (ssl->version == TLS1_VERSION) |
52 |
sessInfo.version = TLS::TLS_v1; |
53 |
@@ -6880,7 +6886,9 @@ static QStringList all_hash_types() |
54 |
{ |
55 |
QStringList list; |
56 |
list += "sha1"; |
57 |
+#ifdef HAVE_OPENSSL_SHA0 |
58 |
list += "sha0"; |
59 |
+#endif |
60 |
list += "ripemd160"; |
61 |
#ifdef HAVE_OPENSSL_MD2 |
62 |
list += "md2"; |
63 |
@@ -7133,8 +7141,10 @@ public: |
64 |
return new opensslInfoContext(this); |
65 |
else if ( type == "sha1" ) |
66 |
return new opensslHashContext( EVP_sha1(), this, type); |
67 |
+#ifdef HAVE_OPENSSL_SHA0 |
68 |
else if ( type == "sha0" ) |
69 |
return new opensslHashContext( EVP_sha(), this, type); |
70 |
+#endif |
71 |
else if ( type == "ripemd160" ) |
72 |
return new opensslHashContext( EVP_ripemd160(), this, type); |
73 |
#ifdef HAVE_OPENSSL_MD2 |