[svn] gcry - r1258 - trunk/tests
svn author wk
cvs at cvs.gnupg.org
Wed Jun 20 20:08:21 CEST 2007
Author: wk
Date: 2007-06-20 20:07:52 +0200 (Wed, 20 Jun 2007)
New Revision: 1258
Modified:
trunk/tests/benchmark.c
Log:
Add an RSA benchmark (fix)
Modified: trunk/tests/benchmark.c
===================================================================
--- trunk/tests/benchmark.c 2007-06-20 17:02:25 UTC (rev 1257)
+++ trunk/tests/benchmark.c 2007-06-20 18:07:52 UTC (rev 1258)
@@ -597,7 +597,7 @@
fflush (stdout);
x = gcry_mpi_new (p_sizes[testno]);
- gcry_mpi_randomize (x, p_sizes[testno], GCRY_WEAK_RANDOM);
+ gcry_mpi_randomize (x, p_sizes[testno]-8, GCRY_WEAK_RANDOM);
err = gcry_sexp_build (&data, NULL, "(data (flags raw) (value %m))", x);
gcry_mpi_release (x);
if (err)
@@ -609,7 +609,7 @@
gcry_sexp_release (sig);
err = gcry_pk_sign (&sig, data, sec_key);
if (err)
- die ("signing failed: %s\n", gpg_strerror (err));
+ die ("signing failed (%d): %s\n", count, gpg_strerror (err));
}
stop_timer ();
printf (" %s", elapsed_time ());
@@ -625,7 +625,7 @@
show_sexp ("seckey:\n", sec_key);
show_sexp ("data:\n", data);
show_sexp ("sig:\n", sig);
- die ("verify failed: %s\n", gpg_strerror (err));
+ die ("verify failed (%d): %s\n", count, gpg_strerror (err));
}
}
stop_timer ();
More information about the Gnupg-commits
mailing list