summaryrefslogtreecommitdiffstats
path: root/kbx/keybox.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-01-14 16:29:45 +0100
committerWerner Koch <wk@gnupg.org>2016-01-14 16:47:42 +0100
commitf5cceef115f0307664956d01c48b1b397fdad4b3 (patch)
treed0a46e2336192d942c03576341d650b421c5057d /kbx/keybox.h
parentgpg: Make --list-options show-usage the default. (diff)
downloadgnupg2-f5cceef115f0307664956d01c48b1b397fdad4b3.tar.xz
gnupg2-f5cceef115f0307664956d01c48b1b397fdad4b3.zip
kbx: Add function keybox_tmp_names to avoid code duplication.
* kbx/keybox-update.c (create_tmp_file): Move some code to... * kbx/keybox-util.c (keybox_tmp_names): new. * g10/keyring.c: Include keybox.h. (create_tmp_file): Replace parts by keybox_tmp_names. -- Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'kbx/keybox.h')
-rw-r--r--kbx/keybox.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/kbx/keybox.h b/kbx/keybox.h
index 3c60971a8..4d556c571 100644
--- a/kbx/keybox.h
+++ b/kbx/keybox.h
@@ -132,6 +132,9 @@ void keybox_set_malloc_hooks ( void *(*new_alloc_func)(size_t n),
void *(*new_realloc_func)(void *p, size_t n),
void (*new_free_func)(void*) );
+gpg_error_t keybox_tmp_names (const char *filename, int for_keyring,
+ char **r_bakname, char **r_tmpname);
+
#ifdef __cplusplus
}