]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
implement workaround for openssl regression (fixes #981) master
authorLukas Schauer <lukas@schauer.dev>
Fri, 24 Oct 2025 07:14:05 +0000 (09:14 +0200)
committerLukas Schauer <lukas@schauer.dev>
Fri, 24 Oct 2025 07:22:31 +0000 (09:22 +0200)
The introduction of the `-multi` option to the x509 subcommand
introduced a regression to the `-checkend` behaviour, preventing
openssl to correctly indicate the certificate expiry status via
its exit code.

This commit introduces a (maybe temporary) workaround by instead
checking the output string.

dehydrated

index 28c4711cfccdfc4700807f7110a55e608bbcd57f..48671513e666267f1f840ffb5c8e85f9b373b6c9 100755 (executable)
@@ -1952,7 +1952,7 @@ command_sign_domains() {
       valid="$("${OPENSSL}" x509 -enddate -noout -in "${cert}" | cut -d= -f2- )"
 
       printf " + Valid till %s " "${valid}"
-      if ("${OPENSSL}" x509 -checkend $((RENEW_DAYS * 86400)) -noout -in "${cert}" > /dev/null 2>&1); then
+      if ("${OPENSSL}" x509 -checkend $((RENEW_DAYS * 86400)) -noout -in "${cert}" 2>&1 | grep -q "will not expire"); then
         printf "(Longer than %d days). " "${RENEW_DAYS}"
         if [[ "${force_renew}" = "yes" ]]; then
           echo "Ignoring because renew was forced!"