diff options
-rw-r--r-- | cassandra-cpp-driver-openssl3.patch | 37 | ||||
-rw-r--r-- | cassandra-cpp-driver.spec | 9 |
2 files changed, 45 insertions, 1 deletions
diff --git a/cassandra-cpp-driver-openssl3.patch b/cassandra-cpp-driver-openssl3.patch new file mode 100644 index 0000000..7e26495 --- /dev/null +++ b/cassandra-cpp-driver-openssl3.patch @@ -0,0 +1,37 @@ +From 71f2f6df263871bf56372160291f47e81856046c Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 10 Nov 2021 16:36:40 +0100 +Subject: [PATCH] drop deprecated call with OpenSSL 3.0 + +--- + src/ssl/ssl_openssl_impl.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/ssl/ssl_openssl_impl.cpp b/src/ssl/ssl_openssl_impl.cpp +index 3b1124378..90f8ba631 100644 +--- a/src/ssl/ssl_openssl_impl.cpp ++++ b/src/ssl/ssl_openssl_impl.cpp +@@ -91,7 +91,11 @@ static void ssl_log_errors(const char* context) { + const char* data; + int flags; + int err; ++#if (OPENSSL_VERSION_NUMBER >= 0x30000000L) ++ while ((err = ERR_get_error_all(NULL, NULL, NULL, &data, &flags)) != 0) { ++#else + while ((err = ERR_get_error_line_data(NULL, NULL, &data, &flags)) != 0) { ++#endif + char buf[256]; + ERR_error_string_n(err, buf, sizeof(buf)); + LOG_ERROR("%s: %s:%s", context, buf, (flags & ERR_TXT_STRING) ? data : ""); +@@ -104,7 +108,11 @@ static String ssl_error_string() { + int flags; + int err; + String error; ++#if (OPENSSL_VERSION_NUMBER >= 0x30000000L) ++ while ((err = ERR_get_error_all(NULL, NULL, NULL, &data, &flags)) != 0) { ++#else + while ((err = ERR_get_error_line_data(NULL, NULL, &data, &flags)) != 0) { ++#endif + char buf[256]; + ERR_error_string_n(err, buf, sizeof(buf)); + if (!error.empty()) error.push_back(','); diff --git a/cassandra-cpp-driver.spec b/cassandra-cpp-driver.spec index f4077e5..45839d3 100644 --- a/cassandra-cpp-driver.spec +++ b/cassandra-cpp-driver.spec @@ -18,13 +18,15 @@ Name: cassandra-cpp-driver Summary: DataStax C/C++ Driver for Apache Cassandra Version: 2.16.1%{?prever:~%{prever}} -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 Group: System Environment/Libraries URL: http://datastax.github.io/cpp-driver/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever:-%{prever}}-%{gh_short}.tar.gz +Patch0: %{name}-openssl3.patch + BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake >= 2.8.12 @@ -54,6 +56,7 @@ for %{name}. %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 find examples -name .gitignore -exec rm {} \; -print @@ -104,6 +107,10 @@ make install DESTDIR="%{buildroot}" %changelog +* Wed Nov 10 2021 Remi Collet <remi@remirepo.net> - 2.16.1-2 +- add patch for OpenSSL 3.0 from + https://github.com/datastax/cpp-driver/pull/519 + * Tue Apr 6 2021 Remi Collet <remi@remirepo.net> - 2.16.1-1 - update to 2.16.1 |