1
/* kbx.h - The GnuPG Keybox
2
* Copyright (C) 2000 Free Software Foundation, Inc.
4
* This file is part of GnuPG.
6
* GnuPG is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* GnuPG is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
28
typedef struct kbxblob *KBXBLOB;
30
int kbx_new_blob ( KBXBLOB *r_blob, char *image, size_t imagelen );
31
int kbx_create_blob ( KBXBLOB *r_blob, KBNODE keyblock );
32
void kbx_release_blob ( KBXBLOB blob );
33
const char *kbx_get_blob_image ( KBXBLOB blob, size_t *n );
35
int kbx_dump_blob ( FILE *fp, KBXBLOB blob );
36
int kbx_blob_has_fpr ( KBXBLOB blob, const byte *fpr );
37
int kbx_blob_has_kid ( KBXBLOB blob, const byte *keyidbuf, size_t keyidlen );
38
int kbx_blob_has_uid ( KBXBLOB blob,
39
int (*cmp)(const byte *, size_t, void *), void *opaque );
42
int kbx_read_blob ( KBXBLOB *r_blob, FILE *a );
45
int kbxfile_search_by_fpr( const char *filename, const byte *fpr );
46
int kbxfile_search_by_kid ( const char *filename, u32 *kid, int mode );
47
int kbxfile_search_by_uid ( const char *filename, const char *name );
48
void print_kbxfile( const char *filename );