diff options
author | ume <ume@FreeBSD.org> | 2001-07-03 17:46:48 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-07-03 17:46:48 +0000 |
commit | 652be9cfdd22e0f15b25b9e65a322b8d4fbb1d4a (patch) | |
tree | cc53d1587c1a103693db84a32437546e72f3679b /sys/crypto/des/des_setkey.c | |
parent | 5a82aadeb1b9d81151a5e1d339e517dd4bc477e7 (diff) | |
download | FreeBSD-src-652be9cfdd22e0f15b25b9e65a322b8d4fbb1d4a.zip FreeBSD-src-652be9cfdd22e0f15b25b9e65a322b8d4fbb1d4a.tar.gz |
properly check DES weak key. KAME PR 363.
Obtained from: KAME
MFC after: 1 week
Diffstat (limited to 'sys/crypto/des/des_setkey.c')
-rw-r--r-- | sys/crypto/des/des_setkey.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/crypto/des/des_setkey.c b/sys/crypto/des/des_setkey.c index 2ddf8bd..ff12ee4 100644 --- a/sys/crypto/des/des_setkey.c +++ b/sys/crypto/des/des_setkey.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: des_setkey.c,v 1.5 2000/11/06 13:58:09 itojun Exp $ */ +/* $KAME: des_setkey.c,v 1.6 2001/07/03 14:27:53 itojun Exp $ */ /* crypto/des/set_key.c */ /* Copyright (C) 1995-1996 Eric Young (eay@mincom.oz.au) @@ -127,10 +127,7 @@ des_cblock (*key); * this section very often :-(, thanks to * engineering@MorningStar.Com for the fix * eay 93/06/29 */ -/* - if (memcmp(weak_keys[i],key,sizeof(key)) == 0) return(1); -*/ - if (bcmp(weak_keys[i],key,sizeof(key)) == 0) return(1); + if (bcmp(weak_keys[i],key,sizeof(*key)) == 0) return(1); return(0); } |