aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/keybox-file.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2013-11-15 14:54:31 +0000
committerWerner Koch <[email protected]>2013-11-15 14:54:31 +0000
commit5499942571a88a1223a7318992605c6d29858866 (patch)
tree6ee1f5c177484beed5e6142bb11d7ac7179fc0a9 /kbx/keybox-file.c
parentFix minor compiler warnings. (diff)
downloadgnupg-5499942571a88a1223a7318992605c6d29858866.tar.gz
gnupg-5499942571a88a1223a7318992605c6d29858866.zip
kbx: Implement update operation for OpenPGP keyblocks.
* kbx/keybox-update.c (keybox_update_keyblock): Implement. * kbx/keybox-search.c (get_blob_flags): Move to ... * kbx/keybox-defs.h (blob_get_type): here. * kbx/keybox-file.c (_keybox_read_blob2): Fix calling without R_BLOB. * g10/keydb.c (build_keyblock_image): Allow calling without R_SIGSTATUS. (keydb_update_keyblock): Implement for keybox. * kbx/keybox-dump.c (_keybox_dump_blob): Fix printing of the unhashed size. Print "does not expire" also on 64 bit platforms. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'kbx/keybox-file.c')
-rw-r--r--kbx/keybox-file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kbx/keybox-file.c b/kbx/keybox-file.c
index 027bcf8d7..f72099348 100644
--- a/kbx/keybox-file.c
+++ b/kbx/keybox-file.c
@@ -43,7 +43,7 @@ ftello (FILE *stream)
/* Read a block at the current postion and return it in r_blob.
- r_blob may be NULL to simply skip the current block */
+ r_blob may be NULL to simply skip the current block. */
int
_keybox_read_blob2 (KEYBOXBLOB *r_blob, FILE *fp, int *skipped_deleted)
{
@@ -55,7 +55,8 @@ _keybox_read_blob2 (KEYBOXBLOB *r_blob, FILE *fp, int *skipped_deleted)
*skipped_deleted = 0;
again:
- *r_blob = NULL;
+ if (r_blob)
+ *r_blob = NULL;
off = ftello (fp);
if (off == (off_t)-1)
return gpg_error_from_syserror ();