From 6fd5205b9044826925bf0b64dcafd241030b4ece Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 1 Apr 2016 20:17:43 +0200 Subject: prefer private over public keys --- crypt-expiry-check | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypt-expiry-check b/crypt-expiry-check index 572f821..6cc5dde 100755 --- a/crypt-expiry-check +++ b/crypt-expiry-check @@ -401,7 +401,8 @@ check_gpg_key_status() { fi GPG_ADDRESS="${1}" - KEY_INFO="$(${GPG} --list-keys ${GPG_ADDRESS})" + KEY_INFO="$(${GPG} --list-secret-keys ${GPG_ADDRESS} 2> /dev/null)" + [ -z "${KEY_INFO}" ] && KEY_INFO="$(${GPG} --list-keys ${GPG_ADDRESS})" KEY_DATE_STR="$( echo "${KEY_INFO}" | \ -- cgit v1.2.3-70-g09d2