]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - gpgwww.c
cscvs to tla changeset 4
[onak.git] / gpgwww.c
index 265422fc0f1412e6f8ef6721b247834e2d13046a..dc79135e69a5a1de4cc841b4fda93401693b4ef1 100644 (file)
--- a/gpgwww.c
+++ b/gpgwww.c
@@ -14,6 +14,7 @@
 #include "getcgi.h"
 #include "hash.h"
 #include "keydb.h"
 #include "getcgi.h"
 #include "hash.h"
 #include "keydb.h"
+#include "onak-conf.h"
 #include "stats.h"
 
 void dofindpath(uint64_t have, uint64_t want, bool html)
 #include "stats.h"
 
 void dofindpath(uint64_t have, uint64_t want, bool html)
@@ -22,6 +23,9 @@ void dofindpath(uint64_t have, uint64_t want, bool html)
        int rec;
        char *uid;
 
        int rec;
        char *uid;
 
+       have = getfullkeyid(have);
+       want = getfullkeyid(want);
+
        /*
         * Make sure the keys we have and want are in the cache.
         */
        /*
         * Make sure the keys we have and want are in the cache.
         */
@@ -52,30 +56,31 @@ void dofindpath(uint64_t have, uint64_t want, bool html)
                                want);
        } else {
                printf("%d steps from 0x%llX to 0x%llX\n",
                                want);
        } else {
                printf("%d steps from 0x%llX to 0x%llX\n",
-                               keyinfoa->colour, have, want);
+                               keyinfoa->colour, have & 0xFFFFFFFF,
+                               want & 0xFFFFFFFF);
                curkey = keyinfoa;
                while (curkey != NULL && curkey->keyid != 0) {
                        uid = keyid2uid(curkey->keyid);
                        if (html && uid == NULL) {
                                printf("<a href=\"lookup?op=get&search=%llX\">"
                                        "0x%llX</a> ([User id not found])%s)%s\n",
                curkey = keyinfoa;
                while (curkey != NULL && curkey->keyid != 0) {
                        uid = keyid2uid(curkey->keyid);
                        if (html && uid == NULL) {
                                printf("<a href=\"lookup?op=get&search=%llX\">"
                                        "0x%llX</a> ([User id not found])%s)%s\n",
-                                       curkey->keyid,
-                                       curkey->keyid,
+                                       curkey->keyid & 0xFFFFFFFF,
+                                       curkey->keyid & 0xFFFFFFFF,
                                        (curkey->keyid == want) ? "" :
                                         " signs");
                        } else if (html && uid != NULL) {
                                printf("<a href=\"lookup?op=get&search=%llX\">"
                                        "0x%llX</a> (<a href=\"lookup?op=vindex"
                                        "&search=0x%llX\">%s</a>)%s\n",
                                        (curkey->keyid == want) ? "" :
                                         " signs");
                        } else if (html && uid != NULL) {
                                printf("<a href=\"lookup?op=get&search=%llX\">"
                                        "0x%llX</a> (<a href=\"lookup?op=vindex"
                                        "&search=0x%llX\">%s</a>)%s\n",
-                                       curkey->keyid,
-                                       curkey->keyid,
-                                       curkey->keyid,
+                                       curkey->keyid & 0xFFFFFFFF,
+                                       curkey->keyid & 0xFFFFFFFF,
+                                       curkey->keyid & 0xFFFFFFFF,
                                        txt2html(keyid2uid(curkey->keyid)),
                                        (curkey->keyid == want) ? "" :
                                         " signs");
                        } else {
                                printf("0x%llX (%s)%s\n",
                                        txt2html(keyid2uid(curkey->keyid)),
                                        (curkey->keyid == want) ? "" :
                                         " signs");
                        } else {
                                printf("0x%llX (%s)%s\n",
-                                       curkey->keyid,
+                                       curkey->keyid & 0xFFFFFFFF,
                                        (uid == NULL) ? "[User id not found]" :
                                                uid,
                                        (curkey->keyid == want) ? "" :
                                        (uid == NULL) ? "[User id not found]" :
                                                uid,
                                        (curkey->keyid == want) ? "" :
@@ -137,7 +142,7 @@ int main(int argc, char *argv[])
        puts("</PRE>");
 
        puts("<HR>");
        puts("</PRE>");
 
        puts("<HR>");
-       puts("Produced by gpgwww 0.0.1, part of onak. <A HREF=\"mailto:noodles-onak@earth.li\">Jonathan McDowell</A>");
+       puts("Produced by gpgwww " VERSION ", part of onak. <A HREF=\"mailto:noodles-onak@earth.li\">Jonathan McDowell</A>");
        puts("</HTML>");
 
        return EXIT_SUCCESS;
        puts("</HTML>");
 
        return EXIT_SUCCESS;