]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Subkey expiration date check shall not happen with expired keys
authorrhatto <rhatto@ratatosk.fluxo.info>
Fri, 14 Mar 2014 16:48:18 +0000 (13:48 -0300)
committerrhatto <rhatto@ratatosk.fluxo.info>
Fri, 14 Mar 2014 16:48:18 +0000 (13:48 -0300)
lib/keyringer/functions

index e0cccecacf3c45cddbe0b1e0e4ac65c595dc6814..832385e55521c7f5748d8b510bf3e58c16e3d979 100755 (executable)
@@ -711,10 +711,10 @@ function keyringer_check_expiration {
   for expiry in `gpg --with-colons --fixed-list-mode --list-keys "$recipient" | grep ^sub | cut -d : -f 7`; do
     if [[ "$seconds" -lt "$expiry" ]]; then
       not_expired="1"
-    fi
 
-    if [[ "$ahead" -gt "$expiry" ]] && [ "$BASENAME" == "check" ]; then
-      echo "Warning: subkey from $recipient will expire soon, on `date --date="@$expiry"`"
+      if [[ "$ahead" -gt "$expiry" ]] && [ "$BASENAME" == "check" ]; then
+        echo "Warning: subkey from $recipient will expire soon, on `date --date="@$expiry"`"
+      fi
     fi
   done