aboutsummaryrefslogtreecommitdiff
path: root/lib/keyringer/functions
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-02-13 11:54:45 -0200
committerSilvio Rhatto <rhatto@riseup.net>2014-02-13 11:54:45 -0200
commit2842331046ee4b31d13a210a6d69a87363fa20e1 (patch)
tree625fd0060a34ac0733274cf8f3a234565802c17f /lib/keyringer/functions
parent8f6d44786eda47e945feb209a48afea59939b597 (diff)
downloadkeyringer-2842331046ee4b31d13a210a6d69a87363fa20e1.tar.gz
keyringer-2842331046ee4b31d13a210a6d69a87363fa20e1.tar.bz2
Expiration check should handle keys without expiry dates
Diffstat (limited to 'lib/keyringer/functions')
-rwxr-xr-xlib/keyringer/functions2
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