1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* keybox-defs.h: New BLOBTYPTE_EMPTY.

* keybox-dump.c (_keybox_dump_blob): Handle new type.
* keybox-file.c (_keybox_read_blob): Skip over empty blobs.  Store
the file offset.
* keybox-blob.c (_keybox_new_blob): Add new arg OFF.
(_keybox_get_blob_fileoffset): New.
* keybox-update.c (keybox_delete): Implemented.
This commit is contained in:
Werner Koch 2002-07-22 10:21:04 +00:00
parent bbf580e702
commit 508ce100c9
6 changed files with 101 additions and 16 deletions

View file

@ -35,6 +35,7 @@ typedef unsigned int u32; /* fixme */
#endif
enum {
BLOBTYPE_EMPTY = 0,
BLOBTYPE_HEADER = 1,
BLOBTYPE_PGP = 2,
BLOBTYPE_X509 = 3
@ -97,9 +98,11 @@ int _keybox_create_x509_blob (KEYBOXBLOB *r_blob, KsbaCert cert,
unsigned char *sha1_digest, int as_ephemeral);
#endif /*KEYBOX_WITH_X509*/
int _keybox_new_blob (KEYBOXBLOB *r_blob, char *image, size_t imagelen);
int _keybox_new_blob (KEYBOXBLOB *r_blob, char *image, size_t imagelen,
off_t off);
void _keybox_release_blob (KEYBOXBLOB blob);
const char *_keybox_get_blob_image (KEYBOXBLOB blob, size_t *n);
off_t _keybox_get_blob_fileoffset (KEYBOXBLOB blob);
/*-- keybox-file.c --*/
int _keybox_read_blob (KEYBOXBLOB *r_blob, FILE *fp);