]> the.earth.li Git - onak.git/blobdiff - gpgwww.c
Remove unused worddb_cmp() from DB4 backend
[onak.git] / gpgwww.c
index ae634e9c0f7f8ca6dfd0e202e8e7fe161152de39..0fc58fb3762f1b40b539e8bf80cd1352a8f7a149 100644 (file)
--- a/gpgwww.c
+++ b/gpgwww.c
@@ -21,6 +21,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "build-config.h"
+
 #include "armor.h"
 #include "charfuncs.h"
 #include "cleanup.h"
@@ -32,7 +34,6 @@
 #include "onak-conf.h"
 #include "parsekey.h"
 #include "stats.h"
-#include "version.h"
 
 #define OP_UNKNOWN 0
 #define OP_GET     1
@@ -68,22 +69,18 @@ int getkeyspath(struct onak_dbctx *dbctx,
        struct openpgp_packet_list *packets = NULL;
        struct openpgp_packet_list *list_end = NULL;
        struct stats_key *keyinfoa, *keyinfob, *curkey;
-       uint64_t fullhave, fullwant;
        int pathlen = 0;
 
-       fullhave = dbctx->getfullkeyid(dbctx, have);
-       fullwant = dbctx->getfullkeyid(dbctx, want);
-
        /*
         * Make sure the keys we have and want are in the cache.
         */
-       dbctx->cached_getkeysigs(dbctx, fullhave);
-       dbctx->cached_getkeysigs(dbctx, fullwant);
+       dbctx->cached_getkeysigs(dbctx, have);
+       dbctx->cached_getkeysigs(dbctx, want);
 
-       if ((keyinfoa = findinhash(fullhave)) == NULL) {
+       if ((keyinfoa = findinhash(have)) == NULL) {
                return 1;
        }
-       if ((keyinfob = findinhash(fullwant)) == NULL) {
+       if ((keyinfob = findinhash(want)) == NULL) {
                return 1;
        }
        
@@ -103,7 +100,7 @@ int getkeyspath(struct onak_dbctx *dbctx,
                         */
                        curkey = findinhash(keyinfoa->parent);
                        while (curkey != NULL && curkey->keyid != 0) {
-                               if (curkey->keyid != fullwant &&
+                               if (curkey->keyid != want &&
                                                dbctx->fetch_key_id(dbctx,
                                                curkey->keyid,
                                                &publickey, false)) {
@@ -125,7 +122,7 @@ int getkeyspath(struct onak_dbctx *dbctx,
        /*
         * Add the destination key to the list of returned keys.
         */
-       if (dbctx->fetch_key_id(dbctx, fullwant, &publickey, false)) {
+       if (dbctx->fetch_key_id(dbctx, want, &publickey, false)) {
                flatten_publickey(publickey,
                                &packets,
                                &list_end);
@@ -172,7 +169,7 @@ int main(int argc, char *argv[])
                                "\">Find reverse path</A>\n",
                                to,
                                from);
-               printf("<A HREF=\"gpgwww?from=0x%08" PRIX64 "&to=0x%08" PRIX64
+               printf("<A HREF=\"gpgwww?from=0x%016" PRIX64 "&to=0x%016" PRIX64
                                "&op=get\">"
                                "Get all keys listed</A></P>\n",
                                from,