properly check DES weak key. KAME PR 363.
Obtained from: KAME MFC after: 1 week
This commit is contained in:
parent
41a019c08d
commit
aa62bfb629
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user