void-packages/srcpkgs/nrpe/patches/nrpe-4.0.2-libressl.patch
2020-03-19 18:03:19 +01:00

50 lines
1.9 KiB
Diff

--- src/nrpe.c 2020-03-11 11:40:10.000000000 -0400
+++ src/nrpe.c.new 2020-03-18 19:29:00.770969682 -0400
@@ -147,7 +147,7 @@
ClntCerts client_certs;
SslLogging log_opts;
} sslprm = {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
NULL, NULL, NULL, "ALL:!MD5:@STRENGTH:@SECLEVEL=0", TLSv1_plus, TRUE, 0, SSL_NoLogging
#else
NULL, NULL, NULL, "ALL:!MD5:@STRENGTH", TLSv1_plus, TRUE, 0, SSL_NoLogging
@@ -356,11 +356,11 @@
switch(sslprm.ssl_proto_ver) {
case TLSv1_3:
-#if OPENSSL_VERSION_NUMBER >= 0x10101000
+#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION);
#endif
case TLSv1_3_plus:
-#if OPENSSL_VERSION_NUMBER >= 0x10101000
+#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION);
break;
#endif
@@ -463,7 +463,7 @@
} else {
/* use anonymous DH ciphers */
if (sslprm.allowDH == 2) {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
strncpy(sslprm.cipher_list, "ADH@SECLEVEL=0", MAX_FILENAME_LENGTH - 1);
#else
strncpy(sslprm.cipher_list, "ADH", MAX_FILENAME_LENGTH - 1);
--- src/check_nrpe.c 2020-03-11 11:40:10.000000000 -0400
+++ src/check_nrpe.c.new 2020-03-18 19:52:05.734304117 -0400
@@ -905,11 +905,11 @@
switch(sslprm.ssl_proto_ver) {
case TLSv1_3:
-#if OPENSSL_VERSION_NUMBER >= 0x10101000
+#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION);
#endif
case TLSv1_3_plus:
-#if OPENSSL_VERSION_NUMBER >= 0x10101000
+#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION);
break;
#endif