make some internal functions static; patch supplied by Kurt Roeckx
[oweals/openssl.git] / crypto / evp / e_rc4.c
index 4064cc5fa0471b107ec5db089d9423bf77d7ebed..67af850bea1ab955cdc3159bd57bb9f8a55c3b73 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#ifndef OPENSSL_NO_RC4
-
 #include <stdio.h>
 #include "cryptlib.h"
+
+#ifndef OPENSSL_NO_RC4
+
 #include <openssl/evp.h>
 #include <openssl/objects.h>
 #include <openssl/rc4.h>
@@ -69,8 +70,6 @@
 
 typedef struct
     {
-    /* FIXME: what is the key for? */
-    unsigned char key[EVP_RC4_KEY_SIZE];
     RC4_KEY ks;        /* working key */
     } EVP_RC4_KEY;
 
@@ -91,6 +90,7 @@ static const EVP_CIPHER r4_cipher=
        sizeof(EVP_RC4_KEY),
        NULL,
        NULL,
+       NULL,
        NULL
        };
 
@@ -105,6 +105,7 @@ static const EVP_CIPHER r4_40_cipher=
        sizeof(EVP_RC4_KEY),
        NULL, 
        NULL,
+       NULL,
        NULL
        };
 
@@ -121,9 +122,8 @@ const EVP_CIPHER *EVP_rc4_40(void)
 static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
                        const unsigned char *iv, int enc)
        {
-       memcpy(&data(ctx)->key[0],key,EVP_CIPHER_CTX_key_length(ctx));
        RC4_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx),
-               data(ctx)->key);
+                   key);
        return 1;
        }