Different recipient match algorithms
Stephan Mueller
smueller at chronox.de
Sun Jan 13 06:20:04 CET 2019
Hi,
When using gpg to encrypt to a recipient, the pattern matching logic to
resolve a user-provided recipient identifier to a key seems to be performed
with classify_user_id.
When applying a group definition expansion, the function expand_id performs
the pattern matching by using strcasemp when searching for the group
reference.
With this difference, the following is apparent: If I have 2 keys in my key
ring with both looking like in that order:
AB <ab at c.d>
B <b at c.d>
both recipient resolution operations produce different results when encrypting
to b at c.d. The group resolution resolves ab at c.d whereas the "regular"
resolution operation returns b at c.d.
May I ask why this apparent different key resolution operation? Shouldn't
expand_id also use classify_user_id instead of strcasecmp?
Ciao
Stephan
More information about the Gnupg-devel
mailing list