void-packages/srcpkgs/librdkafka/patches/0001-Patch-for-libressl.patch

71 lines
2.3 KiB
Diff

From 8b2abae04d436d9b6278ed4cd9fc24e73717ca75 Mon Sep 17 00:00:00 2001
From: Kyle Nusbaum <knusbaum+void@sdf.org>
Date: Wed, 1 Aug 2018 13:30:15 -0500
Subject: [PATCH] Patch for libressl
diff --git configure.librdkafka configure.librdkafka
index 337d937..08307a3 100644
--- configure.librdkafka
+++ configure.librdkafka
@@ -95,7 +95,16 @@ void foo (void) {
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
fi
mkl_lib_check "libssl" "WITH_SSL" disable CC "-lssl" \
- "#include <openssl/ssl.h>"
+ "#include <openssl/ssl.h>"
+ # Check if libssl-dev supports the SSL_CTX_set1_sigalgs_list() and
+ # SSL_CTX_set1_curves_list() functions.
+ mkl_compile_check "libssl_sigalgs_curves" "WITH_SSL_SIGALGS_CURVES" disable CC "-lssl" \
+ '
+#include <openssl/ssl.h>
+void foo (void) {
+ SSL_CTX_set1_sigalgs_list(NULL, "TEST");
+ SSL_CTX_set1_curves_list(NULL, "TEST");
+}'
fi
if [[ "$ENABLE_SASL" == "y" ]]; then
diff --git src/rdkafka_conf.c src/rdkafka_conf.c
index c20d9d1..a080bdc 100644
--- src/rdkafka_conf.c
+++ src/rdkafka_conf.c
@@ -485,7 +485,7 @@ static const struct rd_kafka_property rd_kafka_properties[] = {
"protocol. See manual page for `ciphers(1)` and "
"`SSL_CTX_set_cipher_list(3)."
},
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
+#if WITH_SSL_SIGALGS_CURVES
{ _RK_GLOBAL, "ssl.curves.list", _RK_C_STR,
_RK(ssl.curves_list),
"The supported-curves extension in the TLS ClientHello message specifies "
diff --git src/rdkafka_conf.h src/rdkafka_conf.h
index 27e448d..222e74b 100644
--- src/rdkafka_conf.h
+++ src/rdkafka_conf.h
@@ -148,7 +148,7 @@ struct rd_kafka_conf_s {
struct {
SSL_CTX *ctx;
char *cipher_suites;
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
+#if WITH_SSL_SIGALGS_CURVES
char *curves_list;
char *sigalgs_list;
#endif
diff --git src/rdkafka_transport.c src/rdkafka_transport.c
index 815fb31..243399e 100644
--- src/rdkafka_transport.c
+++ src/rdkafka_transport.c
@@ -872,7 +872,7 @@ int rd_kafka_transport_ssl_ctx_init (rd_kafka_t *rk,
}
}
-#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
+#if WITH_SSL_SIGALGS_CURVES
/* Curves */
if (rk->rk_conf.ssl.curves_list) {
rd_kafka_dbg(rk, SECURITY, "SSL",
--
2.18.0