[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-333-g531b25a
by Jussi Kivilinna
cvs at cvs.gnupg.org
Sat Feb 20 20:37:18 CET 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, master has been updated
via 531b25aa94c58f6d2168a9537c8cea6c53d7bbe0 (commit)
from 839d12c221430b60db5e0d6fbb107f22e0a6837f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 531b25aa94c58f6d2168a9537c8cea6c53d7bbe0
Author: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date: Sat Feb 20 21:27:15 2016 +0200
Fix building random-drbg for Win32/64
* random/random-drbg.c: Remove include for sys/types.h and asm/types.h.
(DRBG_PREDICTION_RESIST, DRBG_CTRAES, DRBG_CTRSERPENT, DRBG_CTRTWOFISH)
(DRBG_HASHSHA1, DRBG_HASHSHA224, DRBG_HASHSHA256, DRBG_HASHSHA384)
(DRBG_HASHSHA512, DRBG_HMAC, DRBG_SYM128, DRBG_SYM192)
(DRBG_SYM256): Change 'u_int32_t' to 'u32'.
(drbg_get_entropy) [USE_RNDUNIX, USE_RNDW32]: Fix parameters
'drbg_read_cb' and 'len'.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
diff --git a/random/random-drbg.c b/random/random-drbg.c
index c7b6484..f9d11a3 100644
--- a/random/random-drbg.c
+++ b/random/random-drbg.c
@@ -146,8 +146,6 @@
* gcry_randomize(outbuf, OUTLEN, GCRY_STRONG_RANDOM);
*/
-#include <sys/types.h>
-#include <asm/types.h>
#include <string.h>
#include <unistd.h>
#include <stdint.h>
@@ -177,29 +175,29 @@
*/
/* Internal state control flags (B) */
-#define DRBG_PREDICTION_RESIST ((u_int32_t)1<<28)
+#define DRBG_PREDICTION_RESIST ((u32)1<<28)
/* CTR type modifiers (A.1)*/
-#define DRBG_CTRAES ((u_int32_t)1<<0)
-#define DRBG_CTRSERPENT ((u_int32_t)1<<1)
-#define DRBG_CTRTWOFISH ((u_int32_t)1<<2)
+#define DRBG_CTRAES ((u32)1<<0)
+#define DRBG_CTRSERPENT ((u32)1<<1)
+#define DRBG_CTRTWOFISH ((u32)1<<2)
#define DRBG_CTR_MASK (DRBG_CTRAES | DRBG_CTRSERPENT \
| DRBG_CTRTWOFISH)
/* HASH type modifiers (A.2)*/
-#define DRBG_HASHSHA1 ((u_int32_t)1<<4)
-#define DRBG_HASHSHA224 ((u_int32_t)1<<5)
-#define DRBG_HASHSHA256 ((u_int32_t)1<<6)
-#define DRBG_HASHSHA384 ((u_int32_t)1<<7)
-#define DRBG_HASHSHA512 ((u_int32_t)1<<8)
+#define DRBG_HASHSHA1 ((u32)1<<4)
+#define DRBG_HASHSHA224 ((u32)1<<5)
+#define DRBG_HASHSHA256 ((u32)1<<6)
+#define DRBG_HASHSHA384 ((u32)1<<7)
+#define DRBG_HASHSHA512 ((u32)1<<8)
#define DRBG_HASH_MASK (DRBG_HASHSHA1 | DRBG_HASHSHA224 \
| DRBG_HASHSHA256 | DRBG_HASHSHA384 \
| DRBG_HASHSHA512)
/* type modifiers (A.3)*/
-#define DRBG_HMAC ((u_int32_t)1<<12)
-#define DRBG_SYM128 ((u_int32_t)1<<13)
-#define DRBG_SYM192 ((u_int32_t)1<<14)
-#define DRBG_SYM256 ((u_int32_t)1<<15)
+#define DRBG_HMAC ((u32)1<<12)
+#define DRBG_SYM128 ((u32)1<<13)
+#define DRBG_SYM192 ((u32)1<<14)
+#define DRBG_SYM256 ((u32)1<<15)
#define DRBG_TYPE_MASK (DRBG_HMAC | DRBG_SYM128 | DRBG_SYM192 \
| DRBG_SYM256)
#define DRBG_CIPHER_MASK (DRBG_CTR_MASK | DRBG_HASH_MASK \
@@ -632,12 +630,12 @@ drbg_get_entropy (drbg_state_t drbg, unsigned char *buffer,
rc = _gcry_rndlinux_gather_random (drbg_read_cb, 0, len,
GCRY_VERY_STRONG_RANDOM);
#elif USE_RNDUNIX
- rc = _gcry_rndunix_gather_random (read_cb, 0, length,
+ rc = _gcry_rndunix_gather_random (drbg_read_cb, 0, len,
GCRY_VERY_STRONG_RANDOM);
#elif USE_RNDW32
do
{
- rc = _gcry_rndw32_gather_random (read_cb, 0, length,
+ rc = _gcry_rndw32_gather_random (drbg_read_cb, 0, len,
GCRY_VERY_STRONG_RANDOM);
}
while (rc >= 0 && read_cb_len < read_cb_size);
-----------------------------------------------------------------------
Summary of changes:
random/random-drbg.c | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits
More information about the Gcrypt-devel
mailing list