diff options
Diffstat (limited to 'g10/call-dirmngr.c')
-rw-r--r-- | g10/call-dirmngr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c index 75a7f4650..f7398333c 100644 --- a/g10/call-dirmngr.c +++ b/g10/call-dirmngr.c @@ -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 (); |