summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_rc4.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/e_rc4.c')
-rw-r--r--crypto/evp/e_rc4.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/evp/e_rc4.c b/crypto/evp/e_rc4.c
index 1ac9f70691..bc108f4356 100644
--- a/crypto/evp/e_rc4.c
+++ b/crypto/evp/e_rc4.c
@@ -63,9 +63,9 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
-static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv,int enc);
-static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl);
static EVP_CIPHER r4_cipher=
{
@@ -107,18 +107,20 @@ EVP_CIPHER *EVP_rc4_40(void)
return(&r4_40_cipher);
}
-static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv, int enc)
{
if (key != NULL)
memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx));
RC4_set_key(&(ctx->c.rc4.ks),EVP_CIPHER_CTX_key_length(ctx),
ctx->c.rc4.key);
+ return 1;
}
-static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl)
{
RC4(&(ctx->c.rc4.ks),inl,in,out);
+ return 1;
}
#endif