summaryrefslogtreecommitdiffstats
path: root/kbx/keybox-defs.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-06-02 15:55:00 +0200
committerWerner Koch <wk@gnupg.org>2014-06-02 15:55:00 +0200
commit42c043a8ad542c131917879c9b458f234b4bb645 (patch)
tree1847bf9f4161c5fb0f3bd893fdc5a6e87f4336ec /kbx/keybox-defs.h
parentgpg: Fix bug parsing a zero length user id. (diff)
downloadgnupg2-42c043a8ad542c131917879c9b458f234b4bb645.tar.xz
gnupg2-42c043a8ad542c131917879c9b458f234b4bb645.zip
gpgsm: Add a way to save a found state.
* kbx/keybox-defs.h (keybox_found_s): New. (keybox_handle): Factor FOUND out to above. Add saved_found. * kbx/keybox-init.c (keybox_release): Release saved_found. (keybox_push_found_state, keybox_pop_found_state): New. * sm/keydb.c (keydb_handle): Add field saved_found. (keydb_new): Init it. (keydb_push_found_state, keydb_pop_found_state): New.
Diffstat (limited to 'kbx/keybox-defs.h')
-rw-r--r--kbx/keybox-defs.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/kbx/keybox-defs.h b/kbx/keybox-defs.h
index f79c093fd..7bbcf83cf 100644
--- a/kbx/keybox-defs.h
+++ b/kbx/keybox-defs.h
@@ -85,6 +85,14 @@ struct keybox_name
};
+struct keybox_found_s
+{
+ KEYBOXBLOB blob;
+ off_t offset;
+ size_t pk_no;
+ size_t uid_no;
+ unsigned int n_packets; /*used for delete and update*/
+};
struct keybox_handle {
CONST_KB_NAME kb;
@@ -93,13 +101,8 @@ struct keybox_handle {
int eof;
int error;
int ephemeral;
- struct {
- KEYBOXBLOB blob;
- off_t offset;
- size_t pk_no;
- size_t uid_no;
- unsigned int n_packets; /*used for delete and update*/
- } found;
+ struct keybox_found_s found;
+ struct keybox_found_s saved_found;
struct {
char *name;
char *pattern;