]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Fixes keyringer_check_expiration failure if a public key is listed multiple times...
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2016 14:44:57 +0000 (12:44 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 19 Dec 2016 14:44:57 +0000 (12:44 -0200)
lib/keyringer/functions

index d2a83f4f3f14cc32feb957571108137f2d70921f..1d5392594395430b9364d77a689b926ea393a32d 100755 (executable)
@@ -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))"