From: Silvio Rhatto Date: Mon, 19 Dec 2016 14:44:57 +0000 (-0200) Subject: Fixes keyringer_check_expiration failure if a public key is listed multiple times... X-Git-Tag: 0.5.0~5 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=21ca00d0d8d6e206cb377dc1febe8f66694142d7;p=keyringer.git Fixes keyringer_check_expiration failure if a public key is listed multiple times (#77) --- 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))"