2 * Copyright (C) 1996,1997 Michael R. Elkins <me@mutt.org>
3 * Copyright (C) 1999-2002 Thomas Roessler <roessler@does-not-exist.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifdef CRYPT_BACKEND_CLASSIC_PGP
22 #include "mutt_crypt.h"
25 typedef struct pgp_signature
27 struct pgp_signature *next;
28 unsigned char sigtype;
37 struct pgp_uid *address;
42 const char *algorithm;
43 struct pgp_keyinfo *parent;
44 struct pgp_signature *sigs;
45 struct pgp_keyinfo *next;
47 short fp_len; /* length of fingerprint.
48 * 20 for sha-1, 16 for md5.
50 unsigned char fingerprint[20]; /* large enough to hold SHA-1 and RIPEMD160
51 hashes (20 bytes), MD5 hashes just use the
54 /* Note, that pgp_key_t is now pointer and declared in crypt.h */
56 typedef struct pgp_uid
61 struct pgp_keyinfo *parent;
63 struct pgp_signature *sigs;
77 const char *pgp_pkalgbytype (unsigned char);
79 pgp_key_t pgp_remove_key (pgp_key_t *, pgp_key_t );
80 pgp_uid_t *pgp_copy_uids (pgp_uid_t *, pgp_key_t );
82 short pgp_canencrypt (unsigned char);
83 short pgp_cansign (unsigned char);
84 short pgp_get_abilities (unsigned char);
86 void pgp_free_key (pgp_key_t *kpp);
88 #define pgp_new_keyinfo() safe_calloc (sizeof *((pgp_key_t)0), 1)
90 #endif /* CRYPT_BACKEND_CLASSIC_PGP */