1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#include <config.h>
#ifdef HAVE_LIBOPENCDK
#ifndef OPENPGP_H
# define OPENPGP_H
#include <opencdk.h>
typedef enum gnutls_openpgp_key_fmt { GNUTLS_OPENPGP_FMT_RAW,
GNUTLS_OPENPGP_FMT_BASE64 } gnutls_openpgp_key_fmt;
typedef struct gnutls_openpgp_key_int {
cdk_kbnode_t knode;
cdk_stream_t inp;
} gnutls_openpgp_key_int;
typedef struct gnutls_openpgp_keyring_int {
cdk_keydb_hd_t hd;
} gnutls_openpgp_keyring_int;
typedef struct gnutls_openpgp_trustdb_int {
cdk_stream_t st;
} gnutls_openpgp_trustdb_int;
typedef struct gnutls_openpgp_key_int *gnutls_openpgp_key;
typedef struct gnutls_openpgp_keyring_int *gnutls_openpgp_keyring;
typedef struct gnutls_openpgp_trustdb_int *gnutls_openpgp_trustdb;
int
_gnutls_map_cdk_rc( int rc);
int
gnutls_openpgp_key_get_name( gnutls_openpgp_key key,
int idx,
char *buf, size_t *sizeof_buf);
int gnutls_openpgp_key_get_fingerprint( gnutls_openpgp_key key,
unsigned char *fpr, size_t *fprlen);
int gnutls_openpgp_key_get_pk_algorithm( gnutls_openpgp_key key, unsigned int *bits);
int gnutls_openpgp_key_get_version( gnutls_openpgp_key key);
time_t gnutls_openpgp_key_get_creation_time( gnutls_openpgp_key key);
time_t gnutls_openpgp_key_get_expiration_time( gnutls_openpgp_key key);
int gnutls_openpgp_key_get_id( gnutls_openpgp_key key,
unsigned char keyid[8]);
int gnutls_openpgp_key_init(gnutls_openpgp_key * key);
void gnutls_openpgp_key_deinit(gnutls_openpgp_key key);
int gnutls_openpgp_key_import(gnutls_openpgp_key key,
const gnutls_datum * data, gnutls_openpgp_key_fmt format);
void gnutls_openpgp_keyring_deinit(gnutls_openpgp_keyring keyring);
int gnutls_openpgp_keyring_init(gnutls_openpgp_keyring * keyring);
int gnutls_openpgp_keyring_import(gnutls_openpgp_keyring keyring,
const gnutls_datum * data,
gnutls_openpgp_key_fmt format);
void gnutls_openpgp_trustdb_deinit(gnutls_openpgp_trustdb trustdb);
int gnutls_openpgp_trustdb_init(gnutls_openpgp_trustdb * trustdb);
int gnutls_openpgp_trustdb_import_file(gnutls_openpgp_trustdb trustdb,
const char * file);
int gnutls_openpgp_key_verify_ring( gnutls_openpgp_key key,
gnutls_openpgp_keyring keyring,
unsigned int flags, unsigned int *verify);
int gnutls_openpgp_key_verify_trustdb( gnutls_openpgp_key key,
gnutls_openpgp_trustdb trustdb,
unsigned int flags, unsigned int *verify);
#endif
#endif /* HAVE_LIBOPENCDK */
|