From 21ca00d0d8d6e206cb377dc1febe8f66694142d7 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 19 Dec 2016 12:44:57 -0200 Subject: Fixes keyringer_check_expiration failure if a public key is listed multiple times (#77) --- lib/keyringer/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))" -- cgit v1.2.3