From: Silvio Rhatto Date: Thu, 13 Feb 2014 13:54:45 +0000 (-0200) Subject: Expiration check should handle keys without expiry dates X-Git-Tag: 0.3~5 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=2842331046ee4b31d13a210a6d69a87363fa20e1;p=keyringer.git Expiration check should handle keys without expiry dates --- diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 810effe..5cc92b1 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -549,7 +549,7 @@ EOF expiry="`gpg --with-colons --fixed-list-mode --list-keys "$recipient" | grep ^pub | cut -d : -f 7`" # Check if key is expired - if [[ "$seconds" -gt "$expiry" ]]; then + if [ ! -z "$expiry" ] && [[ "$seconds" -gt "$expiry" ]]; then echo "Fatal: primary key for $recipient expired on `date --date="@$expiry"`" exit 1 else