]> the.earth.li Git - onak.git/blobdiff - wotsap.c
0.6.3 release
[onak.git] / wotsap.c
index 7c71535e762a19d40a9aa0ac72ff1dd2b581a037..0a9f9df543df48c4b0852c2716fd623ea389af7a 100644 (file)
--- a/wotsap.c
+++ b/wotsap.c
@@ -191,12 +191,15 @@ int main(int argc, char *argv[])
 {
        int optchar;
        char *configfile = NULL, *dir = NULL;
-       uint64_t keyid = 0x2DA8B985;
+       uint64_t keyid = 0x94FA372B2DA8B985;
        struct onak_dbctx *dbctx;
 
        while ((optchar = getopt(argc, argv, "c:")) != -1 ) {
                switch (optchar) {
                case 'c':
+                       if (configfile != NULL) {
+                               free(configfile);
+                       }
                        configfile = strdup(optarg);
                        break;
                }
@@ -211,8 +214,7 @@ int main(int argc, char *argv[])
        dbctx = config.dbinit(config.backend, true);
        if (dbctx != NULL) {
                inithash();
-               wotsap(dbctx, dbctx->getfullkeyid(dbctx, keyid),
-                       dir ? dir : ".");
+               wotsap(dbctx, keyid, dir ? dir : ".");
                destroyhash();
                dbctx->cleanupdb(dbctx);
        } else {