File nrpe-static_dh_parameters.patch of Package nrpe
Index: nrpe-4.0.3/macros/ax_nagios_get_ssl
===================================================================
--- nrpe-4.0.3.orig/macros/ax_nagios_get_ssl
+++ nrpe-4.0.3/macros/ax_nagios_get_ssl
@@ -292,10 +292,15 @@ if test x$SSL_TYPE != xNONE; then
AC_DEFINE(USE_SSL_DH)
# Generate DH parameters
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
+ if test -f include/dh.h ; then
+ echo ""
+ echo "*** Skipping generation of DH Parameters for SSL/TLS: include/dh.h already exists ***"
+ else
+ 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
+ fi
fi
fi
fi
Index: nrpe-4.0.3/configure
===================================================================
--- nrpe-4.0.3.orig/configure
+++ nrpe-4.0.3/configure
@@ -7722,10 +7722,15 @@ fi
# Generate DH parameters
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
+ if test -f include/dh.h ; then
+ echo ""
+ echo "*** Skipping generation of DH Parameters for SSL/TLS: include/dh.h already exists ***"
+ else
+ 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
+ fi
fi
fi
fi