[svn] gcry - r1399 - in trunk: random src
svn author wk
cvs at cvs.gnupg.org
Thu Jul 2 16:12:44 CEST 2009
Author: wk
Date: 2009-07-02 16:12:44 +0200 (Thu, 02 Jul 2009)
New Revision: 1399
Modified:
trunk/random/ChangeLog
trunk/random/rndhw.c
trunk/src/ChangeLog
trunk/src/fips.c
Log:
Get more in sync to the Fedora version.
Modified: trunk/random/ChangeLog
===================================================================
--- trunk/random/ChangeLog 2009-07-02 13:56:40 UTC (rev 1398)
+++ trunk/random/ChangeLog 2009-07-02 14:12:44 UTC (rev 1399)
@@ -1,3 +1,7 @@
+2009-07-02 Werner Koch <wk at g10code.com>
+
+ * rndhw.c (poll_padlock): Asm change from Fedora.
+
2009-01-22 Werner Koch <wk at g10code.com>
* random.c (_gcry_random_deinit_external_test): Do not return a
@@ -125,4 +129,4 @@
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
\ No newline at end of file
+
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2009-07-02 13:56:40 UTC (rev 1398)
+++ trunk/src/ChangeLog 2009-07-02 14:12:44 UTC (rev 1399)
@@ -1,5 +1,8 @@
2009-07-02 Werner Koch <wk at g10code.com>
+ * fips.c (_gcry_initialize_fips_mode): Do not use FIPS mode if
+ /proc/.../fips_enabled has insufficient permissions.
+
* dumpsexp.c (main): Fix handling multiple files.
(parse_and_print): Implement hex and octal escaping.
Modified: trunk/random/rndhw.c
===================================================================
--- trunk/random/rndhw.c 2009-07-02 13:56:40 UTC (rev 1398)
+++ trunk/random/rndhw.c 2009-07-02 14:12:44 UTC (rev 1399)
@@ -41,8 +41,8 @@
poll_padlock (void (*add)(const void*, size_t, enum random_origins),
enum random_origins origin, int fast)
{
- char buffer[64+8] __attribute__ ((aligned (8)));
- char *p;
+ volatile char buffer[64+8] __attribute__ ((aligned (8)));
+ volatile char *p;
unsigned int nbytes, status;
/* Peter Gutmann's cryptlib tests again whether the RNG is enabled
@@ -59,8 +59,7 @@
("movl %1, %%edi\n\t" /* Set buffer. */
"xorl %%edx, %%edx\n\t" /* Request up to 8 bytes. */
".byte 0x0f, 0xa7, 0xc0\n\t" /* XSTORE RNG. */
- "movl %%eax, %0\n" /* Return the status. */
- : "=g" (status)
+ : "=a" (status)
: "g" (p)
: "%edx", "%edi", "cc"
);
@@ -88,7 +87,7 @@
if (nbytes)
{
- (*add) (buffer, nbytes, origin);
+ (*add) ((void*)buffer, nbytes, origin);
wipememory (buffer, nbytes);
}
return nbytes;
Modified: trunk/src/fips.c
===================================================================
--- trunk/src/fips.c 2009-07-02 13:56:40 UTC (rev 1398)
+++ trunk/src/fips.c 2009-07-02 14:12:44 UTC (rev 1399)
@@ -155,6 +155,7 @@
fclose (fp);
}
else if ((saved_errno = errno) != ENOENT
+ && saved_errno != EACCES
&& !access ("/proc/version", F_OK) )
{
/* Problem reading the fips file despite that we have the proc
More information about the Gnupg-commits
mailing list