diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2007-09-18 22:02:19 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2007-09-18 22:02:19 +0000 |
commit | 60a50c17457081b214d0e67ae4d197348e65b44b (patch) | |
tree | 6147ed9a892b427eadc4c9a9a1f55dece2c774a0 /sys/arch | |
parent | 3f52b824168b8743c53ff47ac2278be7ed638c5e (diff) |
arc4random_bytes() is the preferred interface for generating nonces;
"looks ok" markus@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/via.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/pci/glxsb.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/via.c b/sys/arch/i386/i386/via.c index 4bcc33df6a6..8f9e494db22 100644 --- a/sys/arch/i386/i386/via.c +++ b/sys/arch/i386/i386/via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: via.c,v 1.14 2007/09/11 01:12:44 deraadt Exp $ */ +/* $OpenBSD: via.c,v 1.15 2007/09/18 22:02:18 djm Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -194,7 +194,7 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri) cw0 |= C3_CRYPT_CWLO_ALG_AES | C3_CRYPT_CWLO_KEYGEN_SW | C3_CRYPT_CWLO_NORMAL; - get_random_bytes(ses->ses_iv, sizeof(ses->ses_iv)); + arc4random_bytes(ses->ses_iv, sizeof(ses->ses_iv)); ses->ses_klen = c->cri_klen; ses->ses_cw0 = cw0; diff --git a/sys/arch/i386/pci/glxsb.c b/sys/arch/i386/pci/glxsb.c index 4ea7493849b..c8712262417 100644 --- a/sys/arch/i386/pci/glxsb.c +++ b/sys/arch/i386/pci/glxsb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glxsb.c,v 1.10 2007/09/10 23:04:46 henric Exp $ */ +/* $OpenBSD: glxsb.c,v 1.11 2007/09/18 22:02:18 djm Exp $ */ /* * Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org> @@ -379,7 +379,7 @@ glxsb_crypto_newsession(uint32_t *sidp, struct cryptoini *cri) return (EINVAL); } - get_random_bytes(ses->ses_iv, sizeof(ses->ses_iv)); + arc4random_bytes(ses->ses_iv, sizeof(ses->ses_iv)); ses->ses_klen = c->cri_klen; /* Copy the key (Geode LX wants the primary key only) */ |