diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-02-13 11:54:45 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-02-13 11:54:45 -0200 |
commit | 2842331046ee4b31d13a210a6d69a87363fa20e1 (patch) | |
tree | 625fd0060a34ac0733274cf8f3a234565802c17f | |
parent | 8f6d44786eda47e945feb209a48afea59939b597 (diff) | |
download | keyringer-2842331046ee4b31d13a210a6d69a87363fa20e1.tar.gz keyringer-2842331046ee4b31d13a210a6d69a87363fa20e1.tar.bz2 |
Expiration check should handle keys without expiry dates
-rwxr-xr-x | lib/keyringer/functions | 2 |
1 files changed, 1 insertions, 1 deletions
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 |