aboutsummaryrefslogtreecommitdiffstats
path: root/g10/main.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-10-18 11:09:47 +0000
committerWerner Koch <[email protected]>2017-10-18 11:56:14 +0000
commitd353287f721ffb56627d55bef04cc770ff0a8681 (patch)
tree6c15b6c5b7eeae86683ae6fe913aec0fd4ba3af9 /g10/main.h
parentgpg: Fix wrong Tofu DB consistency check. (diff)
downloadgnupg-d353287f721ffb56627d55bef04cc770ff0a8681.tar.gz
gnupg-d353287f721ffb56627d55bef04cc770ff0a8681.zip
gpg: Simplify keydb handling of the main import function.
* g10/import.c (import_keys_internal): Return gpg_error_t instead of int. Change var names. (import_keys_es_stream): Ditto. (import_one): Ditto. Use a single keydb_new and simplify the use of of keydb_release. -- Note that this opens a keydb handle before we call get_pubkey_byfprint_fast which internally uses another key db handle. A further patch will cleanup this double use. Note that we also disable the keydb caching for the insert case. The s/int/gpg_error_t/ has been done while checking the call chains of the import functions and making sure that gpg_err_code is always used. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/main.h')
-rw-r--r--g10/main.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/main.h b/g10/main.h
index 48503602b..4a8f8c32a 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -356,7 +356,7 @@ gpg_error_t read_key_from_file (ctrl_t ctrl, const char *fname,
void import_keys (ctrl_t ctrl, char **fnames, int nnames,
import_stats_t stats_hd, unsigned int options,
int origin, const char *url);
-int import_keys_es_stream (ctrl_t ctrl, estream_t fp,
+gpg_error_t import_keys_es_stream (ctrl_t ctrl, estream_t fp,
import_stats_t stats_handle,
unsigned char **fpr, size_t *fpr_len,
unsigned int options,