2 * gpgwww.c - www interface to path finder.
4 * Jonathan McDowell <noodles@earth.li>
6 * Copyright 2001-2002 Project Purple.
17 #include "onak-conf.h"
20 void parsecgistuff(char **cgiparams, uint64_t *from, uint64_t *to)
24 if (cgiparams != NULL) {
26 while (cgiparams[i] != NULL) {
27 if (!strcmp(cgiparams[i], "to")) {
28 *to = strtoul(cgiparams[i+1], NULL, 16);
29 } else if (!strcmp(cgiparams[i], "from")) {
30 *from = strtoul(cgiparams[i+1], NULL, 16);
39 int main(int argc, char *argv[])
41 char **cgiparams = NULL; /* Our CGI parameter block */
42 uint64_t from = 0, to = 0;
44 cgiparams = getcgivars(argc, argv);
46 start_html("Experimental PGP key path finder results");
48 parsecgistuff(cgiparams, &from, &to);
50 if (from == 0 || to == 0) {
51 printf("Must pass from & to\n");
56 printf("<P>Looking for path from 0x%llX to 0x%llX</P>\n", from, to);
60 dofindpath(from, to, true);
66 puts("Produced by gpgwww " VERSION ", part of onak. "
67 "<A HREF=\"mailto:noodles-onak@earth.li\">"
68 "Jonathan McDowell</A>");
71 cleanupcgi(cgiparams);