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).
16 #include "onak-conf.h"
19 void findmaxpath(unsigned long max)
21 struct stats_key *from, *to, *tmp;
23 unsigned long distance, loop;
26 from = to = tmp = NULL;
27 cached_getkeysigs(0xF1BD4BE45B430367);
29 for (loop = 0; (loop < HASHSIZE) && (distance < max); loop++) {
30 curkey = gethashtableentry(loop);
31 while (curkey != NULL && distance < max) {
32 cached_getkeysigs(((struct stats_key *)
33 curkey->object)->keyid);
35 tmp = furthestkey((struct stats_key *)
37 if (tmp->colour > distance) {
38 from = (struct stats_key *)curkey->object;
40 distance = to->colour;
41 printf("Current max path (#%ld) is from %llX to %llX (%ld steps)\n",
50 printf("Max path is from %llX to %llX (%ld steps)\n",
54 dofindpath(to->keyid, from->keyid, false);
57 int main(int argc, char *argv[])