summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch')
-rw-r--r--meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch
new file mode 100644
index 000000000..500cfab62
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-connectivity/thrift/thrift-0.9.3/0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch
@@ -0,0 +1,41 @@
+From 5f2c7e50b99d72177250c44236c41b99bfc161b5 Mon Sep 17 00:00:00 2001
+From: Andrej Valek <andrej.valek@siemens.com>
+Date: Thu, 7 Jun 2018 15:21:06 +0200
+Subject: [PATCH 4/6] %% original patch:
+ 0004-THRIFT-3207-enable-build-with-OpenSSL-1.1.0-series.patch
+
+---
+ lib/cpp/src/thrift/transport/TSSLSocket.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/lib/cpp/src/thrift/transport/TSSLSocket.cpp b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
+index 98c5326..3da9e45 100644
+--- a/lib/cpp/src/thrift/transport/TSSLSocket.cpp
++++ b/lib/cpp/src/thrift/transport/TSSLSocket.cpp
+@@ -39,6 +39,7 @@
+ #include <thrift/transport/PlatformSocket.h>
+
+ #define OPENSSL_VERSION_NO_THREAD_ID 0x10000000L
++#define OPENSSL_VERSION_WITH_TLSv1_1_AND_TLSv1_2 0x10100000L
+
+ using namespace std;
+ using namespace apache::thrift::concurrency;
+@@ -143,10 +144,15 @@ SSLContext::SSLContext(const SSLProtocol& protocol) {
+ ctx_ = SSL_CTX_new(SSLv3_method());
+ } else if (protocol == TLSv1_0) {
+ ctx_ = SSL_CTX_new(TLSv1_method());
++#if (OPENSSL_VERSION_NUMBER >= OPENSSL_VERSION_WITH_TLSv1_1_AND_TLSv1_2)
+ } else if (protocol == TLSv1_1) {
+ ctx_ = SSL_CTX_new(TLSv1_1_method());
+ } else if (protocol == TLSv1_2) {
+ ctx_ = SSL_CTX_new(TLSv1_2_method());
++#else
++ //Support for this versions will end on 2016-12-31
++ //https://www.openssl.org/about/releasestrat.html
++#endif
+ } else {
+ /// UNKNOWN PROTOCOL!
+ throw TSSLException("SSL_CTX_new: Unknown protocol");
+--
+2.19.0
+
OpenPOWER on IntegriCloud