Third phase of EVP cipher overhaul.
[openssl.git] / crypto / evp / e_cbc_r2.c
index 5e91c9d21ea2ed098f24ff57e8177a7d32be42ff..3552b67417ccff35683031054ac2af722296d0d1 100644 (file)
@@ -139,11 +139,7 @@ EVP_CIPHER *EVP_rc2_40_cbc(void)
 static int rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
             unsigned char *iv, int enc)
        {
-       if (iv != NULL)
-               memcpy(&(ctx->oiv[0]),iv,8);
-       memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
-       if (key != NULL)
-               RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
+       RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
                        key,EVP_CIPHER_key_length(ctx->cipher)*8);
        return 1;
        }