|
@@ -294,8 +294,18 @@ if test x$SSL_TYPE != xNONE; then
|
|
|
if test -f "$sslbin"; then
|
|
if test -f "$sslbin"; then
|
|
|
echo ""
|
|
echo ""
|
|
|
echo "*** Generating DH Parameters for SSL/TLS ***"
|
|
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
|
|
fi
|
|
|
fi
|
|
fi
|