From 2842331046ee4b31d13a210a6d69a87363fa20e1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 13 Feb 2014 11:54:45 -0200 Subject: Expiration check should handle keys without expiry dates --- lib/keyringer/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/keyringer/functions') 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 -- cgit v1.2.3