are angle brackets around email address allowed for auto-key-locate?
Werner Koch
wk at gnupg.org
Wed Oct 16 14:19:59 CEST 2019
On Tue, 15 Oct 2019 22:23, David Hebbeker said:
> The manual [1] says that GnuPG can automatically retrieve keys for
> emails in the "user at example.com" form. Does this exclude emails wrapped
> by angle brackets like "<user at example.com>"?
That is fine. Find below our test addresses.
Salam-Shalom,
Werner
ps.
Here is our test data set. The second string is the exepcted result, if
it is NULL we can't extract a mail address from the string:
{ "Werner Koch <wk at gnupg.org>", "wk at gnupg.org" },
{ "<wk at gnupg.org>", "wk at gnupg.org" },
{ "wk at gnupg.org", "wk at gnupg.org" },
{ "wk at gnupg.org ", NULL },
{ " wk at gnupg.org", NULL },
{ "Werner Koch (test) <wk at gnupg.org>", "wk at gnupg.org" },
{ "Werner Koch <wk at gnupg.org> (test)", "wk at gnupg.org" },
{ "Werner Koch <wk at gnupg.org (test)", NULL },
{ "Werner Koch <wk at gnupg.org >", NULL },
{ "Werner Koch <wk at gnupg.org", NULL },
{ "", NULL },
{ "@", NULL },
{ "bar <>", NULL },
{ "<foo at example.org>", "foo at example.org" },
{ "<foo. at example.org>", "foo. at example.org" },
{ "<.foo. at example.org>", ".foo. at example.org" },
{ "<foo.. at example.org>", "foo.. at example.org" },
{ "<foo..bar at example.org>", "foo..bar at example.org" },
{ "<foo at example.org.>", NULL },
{ "<foo at example..org>", NULL },
{ "<foo at .>", NULL },
{ "<@example.org>", NULL },
{ "<foo@@example.org>", NULL },
{ "<@foo at example.org>", NULL },
{ "<foo at example.org> ()", "foo at example.org" },
{ "<fo()o at example.org> ()", "fo()o at example.org" },
{ "<fo()o at example.org> ()", "fo()o at example.org" },
{ "fo()o at example.org", NULL},
{ "Mr. Foo <foo at example.org><bar at example.net>", "foo at example.org"},
{ "Surname, Forename | company <foo at example.org>", "foo at example.org"},
/* The next one is for sure not RFC-822 correct but nevertheless
* the way gpg does it. We won't change it because the user-id
* is only rfc-822 alike and not compliant (think only of our
* utf-8 requirement). */
{ "\"<foo at example.org>\" <foo at example.net>", "foo at example.org"},
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20191016/ca5b6330/attachment.sig>
More information about the Gnupg-users
mailing list