gpg: Find keys using mail addresses with garbage after the '>'
authorWerner Koch <wk@gnupg.org>
Fri, 20 Mar 2015 12:29:20 +0000 (13:29 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 20 Mar 2015 12:29:20 +0000 (13:29 +0100)
commit783a4a98378fa1aa222d5cb7427dd37151feb08b
treedb187bef2a5be9751c78b4aae01c093f8075534a
parent5136e39c6466de90697153ea253c4b540c1f7d1a
gpg: Find keys using mail addresses with garbage after the '>'

* kbx/keybox-search.c (blob_cmp_mail): Stop comparing at the '>'.
--

This change allows to find mail addresses like

  Joe Doe <joe@example.org> bar
  Joe Doe <joe@example.org> (comment)

using the command

   gpg  -k '<joe@example.org'

or (with syntactic sugar)

   gpg  -k '<joe@example.org>'

These UIDs are ill-formed according to gpg checks but nevertheless are
seen in the wild.

Note, that it does only work with the new keybox format.

Signed-off-by: Werner Koch <wk@gnupg.org>
kbx/keybox-search.c