summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_cfb_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/e_cfb_c.c')
-rw-r--r--crypto/evp/e_cfb_c.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/evp/e_cfb_c.c b/crypto/evp/e_cfb_c.c
index c4efb64bd2..d29e5948a4 100644
--- a/crypto/evp/e_cfb_c.c
+++ b/crypto/evp/e_cfb_c.c
@@ -63,9 +63,9 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
-static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv,int enc);
-static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl);
static EVP_CIPHER cast5_cfb_cipher=
{
@@ -87,7 +87,7 @@ EVP_CIPHER *EVP_cast5_cfb(void)
return(&cast5_cfb_cipher);
}
-static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv, int enc)
{
ctx->num=0;
@@ -97,9 +97,10 @@ static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
if (key != NULL)
CAST_set_key(&(ctx->c.cast_ks),EVP_CIPHER_CTX_key_length(ctx),key);
+ return 1;
}
-static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl)
{
CAST_cfb64_encrypt(
@@ -107,5 +108,6 @@ static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
(long)inl, &(ctx->c.cast_ks),
&(ctx->iv[0]),
&ctx->num,ctx->encrypt);
+ return 1;
}
#endif