]> git.xonotic.org Git - xonotic/d0_blind_id.git/blobdiff - main.c
Merge branch 'little_update' into 'master'
[xonotic/d0_blind_id.git] / main.c
diff --git a/main.c b/main.c
index 2be45cb16422aa4b1ec680ad21d39a636631f957..9995fd5ece643d1563a08d75048f3eaaa593f06b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -68,6 +68,7 @@ static void errx(int status, const char *format, ...)
        va_list ap;
        va_start(ap, format);
        vfprintf(stderr, format, ap);
+       va_end(ap);
        fputs("\n", stderr);
        exit(status);
 }
@@ -83,7 +84,7 @@ int main(int argc, char **argv)
        ctx_other = d0_blind_id_new();
 
        printf("keygen RSA...\n");
-       if(!d0_blind_id_generate_private_key(ctx_self, 256))
+       if(!d0_blind_id_generate_private_key(ctx_self, 1024))
                errx(1, "keygen fail");
        buf2size = sizeof(buf2) - 1;
        if(!d0_blind_id_fingerprint64_public_key(ctx_self, buf2, &buf2size))
@@ -119,9 +120,9 @@ int main(int argc, char **argv)
                buf2size = sizeof(buf2) - 1; if(!d0_blind_id_fingerprint64_public_id(ctx_other, buf2, &buf2size))
                        errx(4, "fp64 fail");
                bench(&bench_stop);
+               ++n;
                if(n % 1024 == 0)
                        printf("gen=%f fp=%f\n", n/bench_gen, n/bench_fp);
-               ++n;
        }
        while(!(quit || argc != 2 || (buf2size > strlen(argv[1]) && !memcmp(buf2, argv[1], strlen(argv[1])))));