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 21:56:24 +0000 (22:56 +0100)
It worked because it was never called.
(cherry picked from commit e9c80e04c1a3b5a0de8e666155ab4ecb2697a77d)

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

index 0890d06c362bca18ae4ca0fd6de16c0e57792c8f..30d44ef2a22f3e3f490af8f1fa2c553d49433f75 100644 (file)
@@ -1001,7 +1001,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 1b758c73fc83faec5716e8bc2fd031851597b254..d6f4a586f6eb9c847ce7a4e657109f707e7a4c32 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;
 }