key lookup strategies

Ans ans at immerda.ch
Sun Nov 28 20:45:09 CET 2010


Hi

I recently discovered that the keylookup in gpg has some funny behaviors.

If i have in my keyring two keys for:

foo at bar.com,
oo at bar.com

and foo happens to be listet before oo.

When i do: gpg --encrypt -r oo at bar.com

it selects the key for foo at bar.com instead of oo at bar.com

I know that it uses the first key to which the pattern applies and that
i could force the correct lookup using -r "<oo at bar.com>" but still it
seems somehow strange.

wouldn't it be better to prefer exact matches before partial ones or
present a selection-dialogue when using the --encrypt option? Because
now it just takes any key, which happens to match first.

cheers and thanks for the good work,
ans.



More information about the Gnupg-devel mailing list