2 gpgstats.c - Program to produce stats on a GPG keyring.
3 Written by Jonathan McDowell <noodles@earth.li>.
5 19/02/2000 - Started writing (sort of).
18 void findmaxpath(unsigned long max)
20 struct stats_key *from, *to, *tmp;
22 unsigned long distance, loop;
25 from = to = tmp = NULL;
26 hash_getkeysigs(0xF1BD4BE45B430367);
28 for (loop = 0; (loop < HASHSIZE) && (distance < max); loop++) {
29 curkey = gethashtableentry(loop);
30 while (curkey != NULL && distance < max) {
31 hash_getkeysigs(((struct stats_key *)
32 curkey->object)->keyid);
34 tmp = furthestkey((struct stats_key *)
36 if (tmp->colour > distance) {
37 from = (struct stats_key *)curkey->object;
39 distance = to->colour;
40 printf("Current max path (#%ld) is from %llX to %llX (%ld steps)\n",
49 printf("Max path is from %llX to %llX (%ld steps)\n",
53 dofindpath(to->keyid, from->keyid, false);
56 int main(int argc, char *argv[])