[svn] gcry - r1373 - in trunk: src tests
svn author wk
cvs at cvs.gnupg.org
Wed Dec 10 15:50:58 CET 2008
Author: wk
Date: 2008-12-10 15:50:57 +0100 (Wed, 10 Dec 2008)
New Revision: 1373
Modified:
trunk/src/ChangeLog
trunk/src/hmac256.c
trunk/tests/ChangeLog
trunk/tests/basic.c
Log:
Fix for big endian hosts.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-12-10 12:23:30 UTC (rev 1372)
+++ trunk/src/ChangeLog 2008-12-10 14:50:57 UTC (rev 1373)
@@ -1,3 +1,7 @@
+2008-12-10 Werner Koch <wk at g10code.com>
+
+ * hmac256.c (finalize): Fix for big endian hosts.
+
2008-12-05 Werner Koch <wk at g10code.com>
* global.c (gcry_free): Save and restore ERRNO if set.
Modified: trunk/tests/ChangeLog
===================================================================
--- trunk/tests/ChangeLog 2008-12-10 12:23:30 UTC (rev 1372)
+++ trunk/tests/ChangeLog 2008-12-10 14:50:57 UTC (rev 1373)
@@ -1,5 +1,8 @@
2008-12-10 Werner Koch <wk at g10code.com>
+ * basic.c (main): Check for error after running self-test in
+ non-fips mode.
+
* pubkey.c (get_dsa_key_with_domain_new): New.
(get_dsa_key_fips186_with_domain_new): New.
(check_run): Call them.
Modified: trunk/src/hmac256.c
===================================================================
--- trunk/src/hmac256.c 2008-12-10 12:23:30 UTC (rev 1372)
+++ trunk/src/hmac256.c 2008-12-10 14:50:57 UTC (rev 1373)
@@ -270,14 +270,8 @@
/* Store the digest into hd->buf. */
p = hd->buf;
-#ifdef WORDS_BIGENDIAN
-#define X(a) do { *p++ = hd->h##a; *p++ = hd->h##a >> 8; \
- *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0)
-#else /* little endian */
#define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
*p++ = hd->h##a >> 8; *p++ = hd->h##a; } while(0)
-
-#endif
X(0);
X(1);
X(2);
Modified: trunk/tests/basic.c
===================================================================
--- trunk/tests/basic.c 2008-12-10 12:23:30 UTC (rev 1372)
+++ trunk/tests/basic.c 2008-12-10 14:50:57 UTC (rev 1373)
@@ -2168,7 +2168,8 @@
else
{
/* If in standard mode, run selftests. */
- gcry_control (GCRYCTL_SELFTEST, 0);
+ if (gcry_control (GCRYCTL_SELFTEST, 0))
+ fail ("running self-test failed\n");
}
if (verbose)
More information about the Gnupg-commits
mailing list