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</P>\n", from, to);
59 initlogthing("gpgwww", config.logfile);
62 dofindpath(from, to, true);
69 puts("Produced by gpgwww " VERSION ", part of onak. "
70 "<A HREF=\"mailto:noodles-onak@earth.li\">"
71 "Jonathan McDowell</A>");
74 cleanupcgi(cgiparams);