diff options
author | Werner Koch <[email protected]> | 2014-08-14 13:20:53 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-08-14 13:21:21 +0000 |
commit | c23c18c1543d1ff58f0f78baaa6a8e319c659ecb (patch) | |
tree | 49a00478985e5c73ce00642f6820cc2a718d4134 /g10/main.h | |
parent | scd: Minor changes to app-sc-hsm. (diff) | |
download | gnupg-c23c18c1543d1ff58f0f78baaa6a8e319c659ecb.tar.gz gnupg-c23c18c1543d1ff58f0f78baaa6a8e319c659ecb.zip |
gpg: Screen keyserver responses.
* g10/main.h (import_screener_t): New.
* g10/import.c (import): Add screener callbacks to param list.
(import_one): Ditto.
(import_secret_one): Ditto.
(import_keys_internal): Ditto.
(import_keys_stream): Ditto.
* g10/keyserver.c (struct ks_retrieval_screener_arg_s): New.
(keyserver_retrieval_screener): New.
(keyserver_get): Pass screener to import_keys_es_stream().
--
These changes introduces import functions that apply a constraining
filter to imported keys. These filters can verify the fingerprints of
the keys returned before importing them into the keyring, ensuring
that the keys fetched from the keyserver are in fact those selected by
the user beforehand.
Signed-off-by: Stefan Tomanek <[email protected]>
This is an extended and fixed versions of Stefan's patch. In addition
to the changes done in gnupg 2.0, namely the commits
5e933008beffbeae7255ece02383606481f9c169
044847a0e2013a2833605c1a9f80cfa6ef353309
088f82c0b5e39687f70e44d3ab719854e808eeb6
the symbol names have been changed to "screener" to void mixing them
up with the iobuf filter feature and it has been changed to be used
with the dirmngr based keyserver lookup.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/main.h')
-rw-r--r-- | g10/main.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/main.h b/g10/main.h index 8fe03ac43..b2efaae3b 100644 --- a/g10/main.h +++ b/g10/main.h @@ -288,6 +288,8 @@ gcry_mpi_t encode_md_value (PKT_public_key *pk, gcry_md_hd_t md, int hash_algo ); /*-- import.c --*/ +typedef gpg_error_t (*import_screener_t)(kbnode_t keyblock, void *arg); + int parse_import_options(char *str,unsigned int *options,int noisy); void import_keys (ctrl_t ctrl, char **fnames, int nnames, void *stats_hd, unsigned int options); @@ -296,7 +298,8 @@ int import_keys_stream (ctrl_t ctrl, iobuf_t inp, void *stats_hd, size_t *fpr_len, unsigned int options); int import_keys_es_stream (ctrl_t ctrl, estream_t fp, void *stats_handle, unsigned char **fpr, size_t *fpr_len, - unsigned int options); + unsigned int options, + import_screener_t screener, void *screener_arg); gpg_error_t import_old_secring (ctrl_t ctrl, const char *fname); void *import_new_stats_handle (void); void import_release_stats_handle (void *p); |