mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Convey --quick option to dirmngr for --auto-key-retrieve.
* g10/call-dirmngr.c (gpg_dirmngr_ks_get): Add arg 'quick'. (gpg_dirmngr_wkd_get): Ditto. * g10/keyserver.c (keyserver_get): Add arg 'quick'. (keyserver_get_chunk): Add arg 'quick'. (keyserver_import_fprint): Ditto. Change callers to pass 0 for it. (keyserver_import_keyid): Ditto. (keyserver_import_wkd): Ditto. * g10/mainproc.c (check_sig_and_print): Call the 3 fucntions with QUICK set. -- Note that this option has not yet been implemented by dirmngr. Dirmngr will simply ignore it for now. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
8b3d0d1a36
commit
a15ed5a1fd
10 changed files with 59 additions and 48 deletions
|
@ -600,6 +600,8 @@ ks_get_data_cb (void *opaque, const void *data, size_t datalen)
|
|||
don't need to escape the patterns before sending them to the
|
||||
server.
|
||||
|
||||
If QUICK is set the dirmngr is advised to use a shorter timeout.
|
||||
|
||||
If R_SOURCE is not NULL the source of the data is stored as a
|
||||
malloced string there. If a source is not known NULL is stored.
|
||||
|
||||
|
@ -609,7 +611,7 @@ ks_get_data_cb (void *opaque, const void *data, size_t datalen)
|
|||
are able to ask for (1000-10-1)/(2+8+1) = 90 keys at once. */
|
||||
gpg_error_t
|
||||
gpg_dirmngr_ks_get (ctrl_t ctrl, char **pattern,
|
||||
keyserver_spec_t override_keyserver,
|
||||
keyserver_spec_t override_keyserver, int quick,
|
||||
estream_t *r_fp, char **r_source)
|
||||
{
|
||||
gpg_error_t err;
|
||||
|
@ -655,7 +657,7 @@ gpg_dirmngr_ks_get (ctrl_t ctrl, char **pattern,
|
|||
|
||||
/* Lump all patterns into one string. */
|
||||
init_membuf (&mb, 1024);
|
||||
put_membuf_str (&mb, "KS_GET --");
|
||||
put_membuf_str (&mb, quick? "KS_GET --quick --" : "KS_GET --");
|
||||
for (idx=0; pattern[idx]; idx++)
|
||||
{
|
||||
put_membuf (&mb, " ", 1); /* Append Delimiter. */
|
||||
|
@ -1289,11 +1291,11 @@ gpg_dirmngr_get_pka (ctrl_t ctrl, const char *userid,
|
|||
|
||||
|
||||
/* Ask the dirmngr to retrieve a key via the Web Key Directory
|
||||
* protocol. On success a new estream with the key is stored at
|
||||
* R_KEY.
|
||||
* protocol. If QUICK is set the dirmngr is advised to use a shorter
|
||||
* timeout. On success a new estream with the key is stored at R_KEY.
|
||||
*/
|
||||
gpg_error_t
|
||||
gpg_dirmngr_wkd_get (ctrl_t ctrl, const char *name, estream_t *r_key)
|
||||
gpg_dirmngr_wkd_get (ctrl_t ctrl, const char *name, int quick, estream_t *r_key)
|
||||
{
|
||||
gpg_error_t err;
|
||||
assuan_context_t ctx;
|
||||
|
@ -1306,7 +1308,7 @@ gpg_dirmngr_wkd_get (ctrl_t ctrl, const char *name, estream_t *r_key)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
line = es_bsprintf ("WKD_GET -- %s", name);
|
||||
line = es_bsprintf ("WKD_GET%s -- %s", quick?" --quick":"", name);
|
||||
if (!line)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue