X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/394938c479925750ffe56c28d281945ba4003a14..a241edc87bed49d6bc5dc3c4c99786a921ae7c8a:/keystructs.h diff --git a/keystructs.h b/keystructs.h index 6c36bbe..4aa8bcb 100644 --- a/keystructs.h +++ b/keystructs.h @@ -1,9 +1,20 @@ /* * keystructs.h - Structures for OpenPGP keys * - * Jonathan McDowell + * Copyright 2002 Jonathan McDowell * - * Copyright 2002 Project Purple + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __KEYSTRUCTS_H__ @@ -65,15 +76,17 @@ struct openpgp_signedpacket_list { /** * struct openpgp_publickey - An OpenPGP public key complete with sigs. * @publickey: The OpenPGP packet for the public key. - * @revocation: The OpenPGP packet for the revocation [optional] + * @revoked: True if the key is revoked. + * @sigs: Any signatures directly on the publickey packet. * @uids: The list of UIDs with signatures for this key. * @subkeys: The list of subkeys with signatures for this key. * @next: The next public key. */ struct openpgp_publickey { struct openpgp_packet *publickey; - struct openpgp_packet_list *revocations; - struct openpgp_packet_list *last_revocation; + bool revoked; + struct openpgp_packet_list *sigs; + struct openpgp_packet_list *last_sig; struct openpgp_signedpacket_list *uids; struct openpgp_signedpacket_list *last_uid; struct openpgp_signedpacket_list *subkeys; @@ -102,4 +115,12 @@ struct stats_key { bool revoked; }; +/** + * struct skshash - holds an SKS key hash (md5 over sorted packet list) + * @hash: The 128 bit MD5 hash of the sorted packet list from the key + */ +struct skshash { + uint8_t hash[16]; +}; + #endif /* __KEYSTRUCTS_H__ */