2 * gpgwww.c - www interface to path finder.
4 * Jonathan McDowell <noodles@earth.li>
6 * Copyright 2001-2002 Project Purple.
18 #include "onak-conf.h"
21 void parsecgistuff(char **cgiparams, uint64_t *from, uint64_t *to)
25 if (cgiparams != NULL) {
27 while (cgiparams[i] != NULL) {
28 if (!strcmp(cgiparams[i], "to")) {
29 *to = strtoul(cgiparams[i+1], NULL, 16);
30 } else if (!strcmp(cgiparams[i], "from")) {
31 *from = strtoul(cgiparams[i+1], NULL, 16);
40 int main(int argc, char *argv[])
42 char **cgiparams = NULL; /* Our CGI parameter block */
43 uint64_t from = 0, to = 0;
45 cgiparams = getcgivars(argc, argv);
47 start_html("Experimental PGP key path finder results");
49 parsecgistuff(cgiparams, &from, &to);
51 if (from == 0 || to == 0) {
52 printf("Must pass from & to\n");
57 printf("<P>Looking for path from 0x%llX to 0x%llX.\n", from, to);
58 printf("<A HREF=\"gpgwww?from=0x%08llX&to=0x%08llX\">"
59 "Find reverse path</A></P>\n",
64 initlogthing("gpgwww", config.logfile);
67 dofindpath(from, to, true, 3);
74 puts("Produced by gpgwww " VERSION ", part of onak. "
75 "<A HREF=\"mailto:noodles-onak@earth.li\">"
76 "Jonathan McDowell</A>");
79 cleanupcgi(cgiparams);