gpg: Fix searching for mail addresses in keyrings.
authorJustus Winter <justus@g10code.com>
Wed, 25 Jan 2017 15:33:20 +0000 (16:33 +0100)
committerJustus Winter <justus@g10code.com>
Wed, 25 Jan 2017 15:58:46 +0000 (16:58 +0100)
commit3f4f20ee6eff052c88647b820d9ecfdbd8df0f40
tree6c5339a6aefc879d5d387aa70c584922037c7647
parent02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba
gpg: Fix searching for mail addresses in keyrings.

* g10/keyring.c (compare_name): Fix KEYDB_SEARCH_MODE_MAIL* searches
in keyrings when the UID is a plain addr-spec.
--
Previously, 'gpg --list-key "<foo@example.org>"' failed if 1/ the
keyring format is used and 2/ the key's UID is a plain addr-spec
(cf. RFC2822 section 4.3), e.g. 'foo@example.org'.

GnuPG-bug-id: 2930
Signed-off-by: Justus Winter <justus@g10code.com>
g10/keyring.c