diff options
author | Erich Eckner <git@eckner.net> | 2016-04-01 20:17:43 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-02 13:26:51 +0200 |
commit | 6fd5205b9044826925bf0b64dcafd241030b4ece (patch) | |
tree | 75bbbf670b68d4e6f4ec560f213846e6e8a3e801 | |
parent | 00f623db7f8eb98d3398f27ba07647862457d0ee (diff) | |
download | crypt-expiry-check-4.0.1.tar.xz |
prefer private over public keysv4.0.1
-rwxr-xr-x | crypt-expiry-check | 3 |
1 files changed, 2 insertions, 1 deletions
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}" | \ |