diff options
author | Werner Koch <[email protected]> | 2016-10-27 06:44:19 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-10-27 07:06:10 +0000 |
commit | a15ed5a1fd5307b3ec1822daf3b138b187db0b5e (patch) | |
tree | de308cfd919343fc9b8109ae1b2c547401140ede /g10/mainproc.c | |
parent | common: Fix gnupg_inotify_has_name, differently. (diff) | |
download | gnupg-a15ed5a1fd5307b3ec1822daf3b138b187db0b5e.tar.gz gnupg-a15ed5a1fd5307b3ec1822daf3b138b187db0b5e.zip |
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 <[email protected]>
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r-- | g10/mainproc.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c index f0527bc6e..fbcf316ac 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -1803,7 +1803,7 @@ check_sig_and_print (CTX c, kbnode_t node) free_public_key (pk); pk = NULL; glo_ctrl.in_auto_key_retrieve++; - res = keyserver_import_keyid (c->ctrl, sig->keyid,spec); + res = keyserver_import_keyid (c->ctrl, sig->keyid,spec, 1); glo_ctrl.in_auto_key_retrieve--; if (!res) rc = do_check_sig (c, node, NULL, @@ -1838,7 +1838,7 @@ check_sig_and_print (CTX c, kbnode_t node) free_public_key (pk); pk = NULL; glo_ctrl.in_auto_key_retrieve++; - res = keyserver_import_keyid (c->ctrl, sig->keyid, spec); + res = keyserver_import_keyid (c->ctrl, sig->keyid, spec, 1); glo_ctrl.in_auto_key_retrieve--; free_keyserver_spec (spec); if (!res) @@ -1847,12 +1847,11 @@ check_sig_and_print (CTX c, kbnode_t node) } } - /* If the above methods didn't work, our next try is to use locate + /* If the above methods didn't work, our next try is to locate * the key via its fingerprint from a keyserver. This requires * that the signers fingerprint is encoded in the signature. We * favor this over the WKD method (to be tried next), because an - * arbitrary keyserver is less subject to web bug like - * monitoring. */ + * arbitrary keyserver is less subject to web bug like monitoring. */ if (gpg_err_code (rc) == GPG_ERR_NO_PUBKEY && opt.flags.rfc4880bis && (opt.keyserver_options.options&KEYSERVER_AUTO_KEY_RETRIEVE) @@ -1869,7 +1868,7 @@ check_sig_and_print (CTX c, kbnode_t node) free_public_key (pk); pk = NULL; glo_ctrl.in_auto_key_retrieve++; - res = keyserver_import_fprint (c->ctrl, p+1, n-1, opt.keyserver); + res = keyserver_import_fprint (c->ctrl, p+1, n-1, opt.keyserver, 1); glo_ctrl.in_auto_key_retrieve--; if (!res) rc = do_check_sig (c, node, NULL, &is_expkey, &is_revkey, &pk); @@ -1889,7 +1888,7 @@ check_sig_and_print (CTX c, kbnode_t node) free_public_key (pk); pk = NULL; glo_ctrl.in_auto_key_retrieve++; - res = keyserver_import_wkd (c->ctrl, sig->signers_uid, NULL, NULL); + res = keyserver_import_wkd (c->ctrl, sig->signers_uid, 1, NULL, NULL); glo_ctrl.in_auto_key_retrieve--; /* Fixme: If the fingerprint is embedded in the signature, * compare it to the fingerprint of the returned key. */ @@ -1908,7 +1907,7 @@ check_sig_and_print (CTX c, kbnode_t node) free_public_key (pk); pk = NULL; glo_ctrl.in_auto_key_retrieve++; - res = keyserver_import_keyid (c->ctrl, sig->keyid, opt.keyserver ); + res = keyserver_import_keyid (c->ctrl, sig->keyid, opt.keyserver, 1); glo_ctrl.in_auto_key_retrieve--; if (!res) rc = do_check_sig (c, node, NULL, &is_expkey, &is_revkey, &pk); |