diff options
author | Can Erkin Acar <canacar@cvs.openbsd.org> | 2007-11-21 19:52:05 +0000 |
---|---|---|
committer | Can Erkin Acar <canacar@cvs.openbsd.org> | 2007-11-21 19:52:05 +0000 |
commit | 77c3127fd840c608e204eb2c1da7673307d2794b (patch) | |
tree | 2ebe43bfbe1b23c3fac8c3225700b642127c540b | |
parent | ec7de52428008e1a25f0efe9740fd8af2e5b8a7d (diff) |
simplify sppp_chap_scr() now that we are using arc4random_bytes()
-rw-r--r-- | sys/net/if_spppsubr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 566ad37e902..a13bd70227f 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.62 2007/11/16 05:08:39 djm Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.63 2007/11/21 19:52:04 canacar Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -4058,12 +4058,10 @@ sppp_chap_tld(struct sppp *sp) HIDE void sppp_chap_scr(struct sppp *sp) { - u_int32_t *ch; u_char clen; /* Compute random challenge. */ - ch = (u_int32_t *)sp->myauth.challenge; - arc4random_bytes(ch, sizeof(*ch) * 4); + arc4random_bytes(sp->myauth.challenge, sizeof(sp->myauth.challenge)); clen = AUTHKEYLEN; sp->confid[IDX_CHAP] = ++sp->pp_seq; |