cscvs to tla changeset 2
[onak.git] / keyindex.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 __KEYINDEX_H__
10 #define __KEYINDEX_H__
11
12 #include <stdbool.h>
13
14 #include "keystructs.h"
15
16 /**
17  *      key_index - List a set of OpenPGP keys.
18  *      @keys: The keys to display.
19  *      @verbose: Should we list sigs as well?
20  *      @fingerprint: List the fingerprint?
21  *      @html: Should we tailor the output for HTML?
22  *
23  *      This function takes a list of OpenPGP public keys and displays an index
24  *      of them. Useful for debugging or the keyserver Index function.
25  */
26 int key_index(struct openpgp_publickey *keys, bool verbose,
27                 bool fingerprint, bool html);
28
29 /**
30  *      keysigs - Return the sigs on a given OpenPGP signature packet list.
31  *      @curll: The current linked list. Can be NULL to create a new list.
32  *      @sigs: The signature list we want the sigs on.
33  *
34  *      Returns a linked list of stats_key elements containing the sigs for the
35  *      supplied OpenPGP signature packet list.
36  */
37 struct ll *keysigs(struct ll *curll,
38                 struct openpgp_packet_list *sigs);
39
40 /**
41  *      keyuids - Takes a key and returns an array of its UIDs
42  *      @key: The key to get the uids of.
43  *      @primary: A pointer to store the primary UID in.
44  *
45  *      keyuids takes a public key structure and builds an array of the UIDs 
46  *      on the key. It also attempts to work out the primary UID and returns a
47  *      separate pointer to that particular element of the array.
48  */
49 char **keyuids(struct openpgp_publickey *key, char **primary);
50
51 #endif