diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2007-11-16 05:08:40 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2007-11-16 05:08:40 +0000 |
commit | 64b2ea406a218d1075510d5fdbb6bd30b2c0825f (patch) | |
tree | bae36432224b34feb677620e8af46ca10cc9b85a /sys/net/if_spppsubr.c | |
parent | 58f36b90b0592c0c12ad394e861611431eb4db5d (diff) |
use arc4random_bytes() instead of multiple arc4random() calls;
ok deraadt@ dlg@ henric@ mcbride@
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r-- | sys/net/if_spppsubr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 10dcd7215f9..566ad37e902 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.61 2007/11/01 03:35:43 deraadt Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.62 2007/11/16 05:08:39 djm Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -4063,10 +4063,7 @@ sppp_chap_scr(struct sppp *sp) /* Compute random challenge. */ ch = (u_int32_t *)sp->myauth.challenge; - ch[0] = arc4random(); - ch[1] = arc4random(); - ch[2] = arc4random(); - ch[3] = arc4random(); + arc4random_bytes(ch, sizeof(*ch) * 4); clen = AUTHKEYLEN; sp->confid[IDX_CHAP] = ++sp->pp_seq; |