X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=decodekey.h;fp=decodekey.h;h=f7df5eff7086abc07def2f756a8967f6322aebf8;hb=5913c95f2c7abf4c3cb06e27d384d80fb4c83547;hp=0000000000000000000000000000000000000000;hpb=f86410ff8aa00dc5c584541f387f77515a8cbd89;p=onak.git diff --git a/decodekey.h b/decodekey.h new file mode 100644 index 0000000..f7df5ef --- /dev/null +++ b/decodekey.h @@ -0,0 +1,45 @@ +/* + * keyindex.h - Routines to list an OpenPGP key. + * + * Jonathan McDowell + * + * Copyright 2002 Project Purple + */ + +#ifndef __DECODEKEY_H__ +#define __DECODEKEY_H__ + +#include "keystructs.h" +#include "ll.h" + +/** + * keysigs - Return the sigs on a given OpenPGP signature packet list. + * @curll: The current linked list. Can be NULL to create a new list. + * @sigs: The signature list we want the sigs on. + * + * Returns a linked list of stats_key elements containing the sigs for the + * supplied OpenPGP signature packet list. + */ +struct ll *keysigs(struct ll *curll, + struct openpgp_packet_list *sigs); + +/** + * sig_keyid - Return the keyid for a given OpenPGP signature packet. + * @packet: The signature packet. + * + * Returns the keyid for the supplied signature packet. + */ +uint64_t sig_keyid(struct openpgp_packet *packet); + +/** + * keyuids - Takes a key and returns an array of its UIDs + * @key: The key to get the uids of. + * @primary: A pointer to store the primary UID in. + * + * keyuids takes a public key structure and builds an array of the UIDs + * on the key. It also attempts to work out the primary UID and returns a + * separate pointer to that particular element of the array. + */ +char **keyuids(struct openpgp_publickey *key, char **primary); + +#endif