cscvs to tla changeset 46
[onak.git] / decodekey.h
1 /*
2  * keyindex.h - Routines to list an OpenPGP key.
3  *
4  * Jonathan McDowell <noodles@earth.li>
5  *
6  * Copyright 2002 Project Purple
7  */
8
9 #ifndef __DECODEKEY_H__
10 #define __DECODEKEY_H__
11
12 #include "keystructs.h"
13 #include "ll.h"
14
15 /**
16  *      keysigs - Return the sigs on a given OpenPGP signature packet list.
17  *      @curll: The current linked list. Can be NULL to create a new list.
18  *      @sigs: The signature list we want the sigs on.
19  *
20  *      Returns a linked list of stats_key elements containing the sigs for the
21  *      supplied OpenPGP signature packet list.
22  */
23 struct ll *keysigs(struct ll *curll,
24                 struct openpgp_packet_list *sigs);
25
26 /**
27  *      sig_keyid - Return the keyid for a given OpenPGP signature packet.
28  *      @packet: The signature packet.
29  *
30  *      Returns the keyid for the supplied signature packet.
31  */
32 uint64_t sig_keyid(struct openpgp_packet *packet);
33
34 /**
35  *      keyuids - Takes a key and returns an array of its UIDs
36  *      @key: The key to get the uids of.
37  *      @primary: A pointer to store the primary UID in.
38  *
39  *      keyuids takes a public key structure and builds an array of the UIDs 
40  *      on the key. It also attempts to work out the primary UID and returns a
41  *      separate pointer to that particular element of the array.
42  */
43 char **keyuids(struct openpgp_publickey *key, char **primary);
44
45 #endif