read_config: only pick first key for each key id

This commit is contained in:
root 2013-01-24 17:17:56 +00:00
parent cd90cea0fe
commit 5e090e019b

View file

@ -364,6 +364,9 @@ read_config()
for recp_ in $conf_part
do
key_line=$(gpg --with-colons --fast-list -k "$recp_" | xgrep ^pub)
isnonnull "${key_line##*"$Newline"*}" ||
echo_info "WARNING: '$recp_' matches multiple keys, using one"
key_line=${key_line%%"$Newline"*}
keyid_=$(xecho "$key_line" | cut -f 5 -d :)
isnonnull "$keyid_" &&