summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-12-19 12:44:57 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-12-19 12:44:57 -0200
commit21ca00d0d8d6e206cb377dc1febe8f66694142d7 (patch)
tree12393d45899b33aa7d407666e6ae61dce190bfd9 /lib
parent47bfafd1226a984452c009b632ad4099c00743c4 (diff)
downloadkeyringer-21ca00d0d8d6e206cb377dc1febe8f66694142d7.tar.gz
keyringer-21ca00d0d8d6e206cb377dc1febe8f66694142d7.tar.bz2
Fixes keyringer_check_expiration failure if a public key is listed multiple times (#77)
Diffstat (limited to 'lib')
-rwxr-xr-xlib/keyringer/functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index d2a83f4..1d53925 100755
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -703,7 +703,7 @@ function keyringer_check_expiration {
seconds="`date +%s`"
# Check the main key
- expiry="`gpg --with-colons --fixed-list-mode --list-keys "$recipient" | grep ^pub | cut -d : -f 7`"
+ expiry="`gpg --with-colons --fixed-list-mode --list-keys "$recipient" | grep ^pub | head -n1 | cut -d : -f 7`"
# TODO: Time to expire can be configured via repository options.
ahead="$((86400 * 30 + $seconds))"