1 /* Support of OpenPGP certificates
2 * Copyright (C) 2002-2004 Andreas Steffen, Zuercher Hochschule Winterthur
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * RCSID $Id: pgp.h,v 1.3 2005/08/07 07:50:09 as Exp $
22 * Length of PGP V3 fingerprint
24 #define PGP_FINGERPRINT_SIZE MD5_DIGEST_SIZE
26 typedef char fingerprint_t
[PGP_FINGERPRINT_SIZE
];
28 /* access structure for an OpenPGP certificate */
30 typedef struct pgpcert pgpcert_t
;
39 enum pubkey_alg pubkeyAlg
;
41 chunk_t publicExponent
;
42 fingerprint_t fingerprint
;
45 extern const pgpcert_t empty_pgpcert
;
46 extern bool parse_pgp(chunk_t blob
, pgpcert_t
*cert
, RSA_private_key_t
*key
);
47 extern void share_pgpcert(pgpcert_t
*cert
);
48 extern void select_pgpcert_id(pgpcert_t
*cert
, struct id
*end_id
);
49 extern pgpcert_t
* add_pgpcert(pgpcert_t
*cert
);
50 extern void list_pgp_end_certs(bool utc
);
51 extern void release_pgpcert(pgpcert_t
*cert
);
52 extern void free_pgpcert(pgpcert_t
*cert
);