evp/e_[aes|camellia].c: fix typo in CBC subroutine.
authorAndy Polyakov <appro@openssl.org>
Wed, 18 Dec 2013 20:42:46 +0000 (21:42 +0100)
committerAndy Polyakov <appro@openssl.org>
Wed, 18 Dec 2013 20:42:46 +0000 (21:42 +0100)
It worked because it was never called.

crypto/evp/e_aes.c
crypto/evp/e_camellia.c

index b4864fe..f8a69a0 100644 (file)
@@ -1004,7 +1004,7 @@ static int aes_cbc_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out,
        else if (ctx->encrypt)
                CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block);
        else
-               CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block);
+               CRYPTO_cbc128_decrypt(in,out,len,&dat->ks,ctx->iv,dat->block);
 
        return 1;
 }
index 1b758c7..d6f4a58 100644 (file)
@@ -305,7 +305,7 @@ static int camellia_cbc_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out,
        else if (ctx->encrypt)
                CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block);
        else
-               CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block);
+               CRYPTO_cbc128_decrypt(in,out,len,&dat->ks,ctx->iv,dat->block);
 
        return 1;
 }