diff options
author | Werner Koch <wk@gnupg.org> | 2021-05-26 14:28:26 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2021-06-16 12:03:13 +0200 |
commit | bebc71d2291e93afb76792c5e210836857103c36 (patch) | |
tree | 93de670211b693b510304bd28df71cb27803ddce /g10/options.h | |
parent | dirmngr: Support pseudo URI scheme "opaque". (diff) | |
download | gnupg2-bebc71d2291e93afb76792c5e210836857103c36.tar.xz gnupg2-bebc71d2291e93afb76792c5e210836857103c36.zip |
gpg,sm: Simplify keyserver spec parsing.
* common/keyserver.h: Remove.
* sm/gpgsm.h (struct keyserver_spec): Remove.
(opt): Change keyserver to a strlist_t.
* sm/gpgsm.c (keyserver_list_free): Remove.
(parse_keyserver_line): Remove.
(main): Store keyserver in an strlist.
* sm/call-dirmngr.c (prepare_dirmngr): Adjust for the strlist. Avoid
an ambiguity in dirmngr by adding a prefix if needed.
* g10/options.h (struct keyserver_spec): Move definition from
keyserver.h to here. Remove most fields.
* g10/keyserver.c (free_keyserver_spec): Adjust.
(cmp_keyserver_spec): Adjust.
(parse_keyserver_uri): Simplify.
(keyidlist): Remove fakev3 arg which does not make any sense because
we don't even support v3 keys.
--
We now rely on the dirmngr to parse the keyserver specs. Thus a bad
specification will not be caught immediately. However, even before
that dirmngr had stricter tests.
Signed-off-by: Werner Koch <wk@gnupg.org>
Ported-from: 9f586700ec4ceac97fd47cd799878a8847342ffa
Diffstat (limited to 'g10/options.h')
-rw-r--r-- | g10/options.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/g10/options.h b/g10/options.h index 2c558d2e7..761d95830 100644 --- a/g10/options.h +++ b/g10/options.h @@ -31,9 +31,14 @@ #include "../common/compliance.h" -/* Declaration of a keyserver spec type. The definition is found in - ../common/keyserver.h. */ -struct keyserver_spec; +/* Object to hold information pertaining to a keyserver; it also + allows building a list of keyservers. For historic reasons this is + not a strlist_t. */ +struct keyserver_spec +{ + struct keyserver_spec *next; + char *uri; +}; typedef struct keyserver_spec *keyserver_spec_t; |