projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use of DEVRANDOM must be #ifdef'ed (the #ifdef was commented out
[oweals/openssl.git]
/
crypto
/
cast
/
c_skey.c
diff --git
a/crypto/cast/c_skey.c
b/crypto/cast/c_skey.c
index 2fc3363dcd0d1672bfd4f1c79dbc47ee2c3be195..acf2c3eeb51e38fe81b0c63d42eb193e599e760f 100644
(file)
--- a/
crypto/cast/c_skey.c
+++ b/
crypto/cast/c_skey.c
@@
-56,7
+56,7
@@
* [including the GNU Public Licence.]
*/
* [including the GNU Public Licence.]
*/
-#include
"cast.h"
+#include
<openssl/cast.h>
#include "cast_lcl.h"
#include "cast_s.h"
#include "cast_lcl.h"
#include "cast_s.h"
@@
-72,10
+72,7
@@
#define S6 CAST_S_table6
#define S7 CAST_S_table7
#define S6 CAST_S_table6
#define S7 CAST_S_table7
-void CAST_set_key(key,len,data)
-CAST_KEY *key;
-int len;
-unsigned char *data;
+void CAST_set_key(CAST_KEY *key, int len, unsigned char *data)
{
CAST_LONG x[16];
CAST_LONG z[16];
{
CAST_LONG x[16];
CAST_LONG z[16];
@@
-88,6
+85,10
@@
unsigned char *data;
if (len > 16) len=16;
for (i=0; i<len; i++)
x[i]=data[i];
if (len > 16) len=16;
for (i=0; i<len; i++)
x[i]=data[i];
+ if(len <= 10)
+ key->short_key=1;
+ else
+ key->short_key=0;
K= &k[0];
X[0]=((x[ 0]<<24)|(x[ 1]<<16)|(x[ 2]<<8)|x[ 3])&0xffffffffL;
K= &k[0];
X[0]=((x[ 0]<<24)|(x[ 1]<<16)|(x[ 2]<<8)|x[ 3])&0xffffffffL;