[svn] gcry - r1365 - in trunk: mpi tests
svn author wk
cvs at cvs.gnupg.org
Wed Dec 3 09:50:32 CET 2008
Author: wk
Date: 2008-12-03 09:50:32 +0100 (Wed, 03 Dec 2008)
New Revision: 1365
Modified:
trunk/mpi/ChangeLog
trunk/mpi/mpi-pow.c
trunk/tests/ChangeLog
trunk/tests/benchmark.c
trunk/tests/fips186-dsa.c
trunk/tests/fipsdrv.c
trunk/tests/mpitests.c
Log:
Fix last moi-pow.c change.
Add some code to allow standalone builds of some test programs.
Modified: trunk/mpi/ChangeLog
===================================================================
--- trunk/mpi/ChangeLog 2008-12-02 12:39:01 UTC (rev 1364)
+++ trunk/mpi/ChangeLog 2008-12-03 08:50:32 UTC (rev 1365)
@@ -1,3 +1,8 @@
+2008-12-03 Werner Koch <wk at g10code.com>
+
+ * mpi-pow.c (gcry_mpi_powm): Fix last change. Asserts are really
+ useful!
+
2008-12-02 Werner Koch <wk at g10code.com>
* mpi-pow.c (gcry_mpi_powm): Re-indent.
@@ -189,7 +194,7 @@
2004-12-16 Werner Koch <wk at g10code.com>
* config.links (mpi_optional_modules): Move entry for powerpc64
- before generic powerpc. Suggested by Rafael Ávila de Espíndola.
+ before generic powerpc. Suggested by Rafael Ãvila de EspÃndola.
2004-03-02 Werner Koch <wk at gnupg.org>
@@ -726,7 +731,7 @@
Wed Apr 8 09:44:33 1998 Werner Koch (wk at isil.d.shuttle.de)
- * config.links: Applied small fix from Ulf Möller.
+ * config.links: Applied small fix from Ulf Möller.
Mon Apr 6 12:38:52 1998 Werner Koch (wk at isil.d.shuttle.de)
Modified: trunk/tests/ChangeLog
===================================================================
--- trunk/tests/ChangeLog 2008-12-02 12:39:01 UTC (rev 1364)
+++ trunk/tests/ChangeLog 2008-12-03 08:50:32 UTC (rev 1365)
@@ -1,5 +1,7 @@
2008-12-02 Werner Koch <wk at g10code.com>
+ * fipsdrv.c: All standalone build.
+
* mpitests.c (mpi_powm): New.
2008-11-28 Werner Koch <wk at g10code.com>
Modified: trunk/mpi/mpi-pow.c
===================================================================
--- trunk/mpi/mpi-pow.c 2008-12-02 12:39:01 UTC (rev 1364)
+++ trunk/mpi/mpi-pow.c 2008-12-03 08:50:32 UTC (rev 1365)
@@ -277,8 +277,12 @@
rsize++;
}
}
+ else if (res->d != rp)
+ {
+ MPN_COPY (res->d, rp, rsize);
+ rp = res->d;
+ }
- gcry_assert (res->d == rp);
if ( rsize >= msize )
{
_gcry_mpih_divrem(rp + msize, 0, rp, rsize, mp, msize);
Modified: trunk/tests/benchmark.c
===================================================================
--- trunk/tests/benchmark.c 2008-12-02 12:39:01 UTC (rev 1364)
+++ trunk/tests/benchmark.c 2008-12-03 08:50:32 UTC (rev 1365)
@@ -29,8 +29,14 @@
#else
#include <sys/times.h>
#endif
-#include <gcrypt.h>
+#ifdef _GCRYPT_IN_LIBGCRYPT
+# include "../src/gcrypt.h"
+#else
+# include <gcrypt.h>
+#endif
+
+
#define PGM "benchmark"
static int verbose;
Modified: trunk/tests/fips186-dsa.c
===================================================================
--- trunk/tests/fips186-dsa.c 2008-12-02 12:39:01 UTC (rev 1364)
+++ trunk/tests/fips186-dsa.c 2008-12-03 08:50:32 UTC (rev 1365)
@@ -25,8 +25,13 @@
#include <string.h>
#include <stdarg.h>
-#include "../src/gcrypt.h"
+#ifdef _GCRYPT_IN_LIBGCRYPT
+# include "../src/gcrypt.h"
+#else
+# include <gcrypt.h>
+#endif
+
#define my_isascii(c) (!((c) & 0x80))
#define digitp(p) (*(p) >= '0' && *(p) <= '9')
#define hexdigitp(a) (digitp (a) \
@@ -444,7 +449,7 @@
}
gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- if (!gcry_check_version (GCRYPT_VERSION))
+ if (!gcry_check_version ("1.4.4"))
die ("version mismatch\n");
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
if (debug)
Modified: trunk/tests/fipsdrv.c
===================================================================
--- trunk/tests/fipsdrv.c 2008-12-02 12:39:01 UTC (rev 1364)
+++ trunk/tests/fipsdrv.c 2008-12-03 08:50:32 UTC (rev 1365)
@@ -32,8 +32,15 @@
#include <assert.h>
#include <unistd.h>
-#include <gcrypt.h>
+#ifdef _GCRYPT_IN_LIBGCRYPT
+# include "../src/gcrypt.h"
+#else
+# include <gcrypt.h>
+# define PACKAGE_BUGREPORT "devnull at example.org"
+# define PACKAGE_VERSION "[build on " __DATE__ " " __TIME__ "]"
+#endif
+
#define PGM "fipsdrv"
#define my_isascii(c) (!((c) & 0x80))
Modified: trunk/tests/mpitests.c
===================================================================
--- trunk/tests/mpitests.c 2008-12-02 12:39:01 UTC (rev 1364)
+++ trunk/tests/mpitests.c 2008-12-03 08:50:32 UTC (rev 1365)
@@ -27,9 +27,12 @@
#include <string.h>
#include <stdarg.h>
-#include "../src/gcrypt.h"
+#ifdef _GCRYPT_IN_LIBGCRYPT
+# include "../src/gcrypt.h"
+#else
+# include <gcrypt.h>
+#endif
-
static int verbose;
static int debug;
More information about the Gnupg-commits
mailing list