Remove added ;.
[openssl.git] / crypto / evp / e_cast.c
index 7116e1a..d77bcd9 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#ifndef OPENSSL_NO_CAST
-
 #include <stdio.h>
 #include "cryptlib.h"
+
+#ifndef OPENSSL_NO_CAST
 #include <openssl/evp.h>
 #include <openssl/objects.h>
 #include "evp_locl.h"
+#include <openssl/cast.h>
 
 static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
                         const unsigned char *iv,int enc);
 
-IMPLEMENT_BLOCK_CIPHER(cast5, cast_ks, CAST, cast_ks, 
-                       NID_cast5, 8, EVP_CAST5_KEY_SIZE, 8,
+typedef struct
+       {
+       CAST_KEY ks;
+       } EVP_CAST_KEY;
+
+#define data(ctx)      EVP_C_DATA(EVP_CAST_KEY,ctx)
+
+IMPLEMENT_BLOCK_CIPHER(cast5, ks, CAST, EVP_CAST_KEY, 
+                       NID_cast5, 8, CAST_KEY_LENGTH, 8, 64,
                        EVP_CIPH_VARIABLE_LENGTH, cast_init_key, NULL,
                        EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL)
                        
 static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
                         const unsigned char *iv, int enc)
        {
-       CAST_set_key(&(ctx->c.cast_ks),EVP_CIPHER_CTX_key_length(ctx),key);
+       CAST_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx),key);
        return 1;
        }