2 * Copyright notice from original mutt:
3 * Copyright (C) 1996,1997 Michael R. Elkins <me@mutt.org>
4 * Copyright (C) 1999-2000 Thomas Roessler <roessler@does-not-exist.org>
6 * This file is part of mutt-ng, see http://www.muttng.org/.
7 * It's licensed under the GNU General Public License,
8 * please see the file GPL in the top level source directory.
11 #ifdef CRYPT_BACKEND_CLASSIC_PGP
13 #include "mutt_crypt.h"
16 typedef struct pgp_signature {
17 struct pgp_signature *next;
18 unsigned char sigtype;
25 struct pgp_uid *address;
30 const char *algorithm;
31 struct pgp_keyinfo *parent;
32 struct pgp_signature *sigs;
33 struct pgp_keyinfo *next;
35 short fp_len; /* length of fingerprint.
36 * 20 for sha-1, 16 for md5.
38 unsigned char fingerprint[20]; /* large enough to hold SHA-1 and RIPEMD160
39 hashes (20 bytes), MD5 hashes just use the
43 /* Note, that pgp_key_t is now pointer and declared in crypt.h */
45 typedef struct pgp_uid {
49 struct pgp_keyinfo *parent;
51 struct pgp_signature *sigs;
63 const char *pgp_pkalgbytype (unsigned char);
65 pgp_key_t pgp_remove_key (pgp_key_t *, pgp_key_t);
66 pgp_uid_t *pgp_copy_uids (pgp_uid_t *, pgp_key_t);
68 short pgp_canencrypt (unsigned char);
69 short pgp_cansign (unsigned char);
70 short pgp_get_abilities (unsigned char);
72 void pgp_free_key (pgp_key_t * kpp);
74 #define pgp_new_keyinfo() mem_calloc (sizeof *((pgp_key_t)0), 1)
76 #endif /* CRYPT_BACKEND_CLASSIC_PGP */