aboutsummaryrefslogtreecommitdiffstats
path: root/kbx
diff options
context:
space:
mode:
Diffstat (limited to 'kbx')
-rw-r--r--kbx/keybox-search.c8
-rw-r--r--kbx/keybox.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c
index 78e0c23b7..df959b67d 100644
--- a/kbx/keybox-search.c
+++ b/kbx/keybox-search.c
@@ -1188,3 +1188,11 @@ keybox_get_flags (KEYBOX_HANDLE hd, int what, int idx, unsigned int *value)
ec = get_flag_from_image (buffer, length, what, value);
return ec? gpg_error (ec):0;
}
+
+off_t
+keybox_offset (KEYBOX_HANDLE hd)
+{
+ if (!hd->fp)
+ return 0;
+ return ftello (hd->fp);
+}
diff --git a/kbx/keybox.h b/kbx/keybox.h
index 8c3114142..c91a28299 100644
--- a/kbx/keybox.h
+++ b/kbx/keybox.h
@@ -77,6 +77,8 @@ int keybox_set_ephemeral (KEYBOX_HANDLE hd, int yes);
int keybox_lock (KEYBOX_HANDLE hd, int yes);
+off_t keybox_offset (KEYBOX_HANDLE hd);
+
/*-- keybox-file.c --*/
/* Fixme: This function does not belong here: Provide a better
interface to create a new keybox file. */