summaryrefslogtreecommitdiffstats
path: root/cassandra-cpp-driver-openssl3.patch
diff options
context:
space:
mode:
Diffstat (limited to 'cassandra-cpp-driver-openssl3.patch')
-rw-r--r--cassandra-cpp-driver-openssl3.patch37
1 files changed, 37 insertions, 0 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(',');