Add DTLS support.
[openssl.git] / crypto / cast / c_skey.c
index 2fc3363dcd0d1672bfd4f1c79dbc47ee2c3be195..76e40005c998373141a3f2728786adbcd714b4a4 100644 (file)
@@ -56,7 +56,7 @@
  * [including the GNU Public Licence.]
  */
 
-#include "cast.h"
+#include <openssl/cast.h>
 #include "cast_lcl.h"
 #include "cast_s.h"
 
 #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, const unsigned char *data)
        {
        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 <= 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;