2 * keystructs.h - Structures for OpenPGP keys
4 * Jonathan McDowell <noodles@earth.li>
6 * Copyright 2002 Project Purple
9 #ifndef __KEYSTRUCTS_H__
10 #define __KEYSTRUCTS_H__
19 * struct openpgp_packet - Stores an OpenPGP packet.
20 * @tag: The packet tag (ie type).
21 * @newformat: Indicates if this is a new format packet.
22 * @length: The length of the packet.
23 * @data: The actual packet
25 * This structure holds any form of OpenPGP packet with minimum common
26 * details decoded out.
28 struct openpgp_packet {
36 * struct openpgp_packet_list - A linked list of OpenPGP packets.
37 * @packet: The actual packet structure.
38 * @next: A pointer to the next packet in the list.
40 * This structure is used to hold a linked list of packets, for example
41 * all the signatures of a public key's UID.
43 struct openpgp_packet_list {
44 struct openpgp_packet *packet;
45 struct openpgp_packet_list *next;
49 * struct openpgp_signedpacket_list - A packet with signatures.
50 * @uid: The OpenPGP packet that's signed.
51 * @sigs: A list of sigs for the packet.
52 * @next: A pointer to the next packet with signatures.
54 * This structure holds an OpenPGP packet along with signatures that are
55 * over this packet. It also links to the next signed packet. It's usually
56 * used to hold a UID or subkey with their associated signatures.
58 struct openpgp_signedpacket_list {
59 struct openpgp_packet *packet;
60 struct openpgp_packet_list *sigs;
61 struct openpgp_packet_list *last_sig;
62 struct openpgp_signedpacket_list *next;
66 * struct openpgp_publickey - An OpenPGP public key complete with sigs.
67 * @publickey: The OpenPGP packet for the public key.
68 * @revocation: The OpenPGP packet for the revocation [optional]
69 * @uids: The list of UIDs with signatures for this key.
70 * @subkeys: The list of subkeys with signatures for this key.
71 * @next: The next public key.
73 struct openpgp_publickey {
74 struct openpgp_packet *publickey;
75 struct openpgp_packet_list *revocations;
76 struct openpgp_packet_list *last_revocation;
77 struct openpgp_signedpacket_list *uids;
78 struct openpgp_signedpacket_list *last_uid;
79 struct openpgp_signedpacket_list *subkeys;
80 struct openpgp_signedpacket_list *last_subkey;
81 struct openpgp_publickey *next;
85 * struct stats_key - holds key details suitable for doing stats on.
87 * @colour: Used for marking during DFS/BFS.
88 * @parent: The key that lead us to this one for DFS/BFS.
89 * @sigs: A linked list of the signatures on this key.
90 * @gotsigs: A bool indicating if we've initialized the sigs element yet.
101 #endif /* __KEYSTRUCTS_H__ */