فهرست منبع

Allow NRPE to compile on EL 9/Debian 11/Ubuntu 22 (maybe).

Still needs more thorough testing - wrote a short program that generates the same code that
would have been created by `openssl dhparam -C` by reading output from `openssl dhparam -text`.
We also set OPENSSL_API_COMPAT to version 1.1.1 and set OPENSSL_NO_DEPRECATED so that compile warnings are suppressed.
madlohe 3 سال پیش
والد
کامیت
3a88a07bd0
3فایلهای تغییر یافته به همراه31 افزوده شده و 4 حذف شده
  1. 12 2
      configure
  2. 12 2
      macros/ax_nagios_get_ssl
  3. 7 0
      src/print_c_code.c

+ 12 - 2
configure

@@ -7724,8 +7724,18 @@ fi
 			if test -f "$sslbin"; then
 				echo ""
 				echo "*** Generating DH Parameters for SSL/TLS ***"
-				# awk to strip off meta data at bottom of dhparam output
-				$sslbin dhparam -C 2048 | awk '/^-----/ {exit} {print}' > include/dh.h
+				# OpenSSL 3 removes dhparam -C
+				# check version and use our own parser if needed
+				nagios_ssl_major_version=`$sslbin version | awk '{print }' | cut -d. -f1`
+
+				if test "x$nagios_ssl_major_version" = "x3"; then
+					$CC src/print_c_code.c -o src/print_c_code
+					$sslbin dhparam -text 2048 | ./src/print_c_code > include/dh.h
+				else
+					# awk to strip off meta data at bottom of dhparam output
+					$sslbin dhparam -C 2048 | awk '/^-----/ {exit} {print}' > include/dh.h
+				fi
+
 			fi
 		fi
 	fi

+ 12 - 2
macros/ax_nagios_get_ssl

@@ -294,8 +294,18 @@ if test x$SSL_TYPE != xNONE; then
 			if test -f "$sslbin"; then
 				echo ""
 				echo "*** Generating DH Parameters for SSL/TLS ***"
-				# awk to strip off meta data at bottom of dhparam output
-				$sslbin dhparam -C 2048 | awk '/^-----/ {exit} {print}' > include/dh.h
+				# OpenSSL 3 removes dhparam -C
+				# check version and use our own parser if needed
+				nagios_ssl_major_version=`$sslbin version | awk '{print $2}' | cut -d. -f1`
+
+				if test "x$nagios_ssl_major_version" = "x3"; then
+					$CC src/print_c_code.c -o src/print_c_code
+					$sslbin dhparam -text 2048 | ./src/print_c_code > include/dh.h
+				else
+					# awk to strip off meta data at bottom of dhparam output
+					$sslbin dhparam -C 2048 | awk '/^-----/ {exit} {print}' > include/dh.h
+				fi
+				
 			fi
 		fi
 	fi

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 7 - 0
src/print_c_code.c


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است