From 68e6ac4379034e0e89550fcecb80b8a6734623fd Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Wed, 18 Dec 2013 21:42:46 +0100 Subject: evp/e_[aes|camellia].c: fix typo in CBC subroutine. It worked because it was never called. (cherry picked from commit e9c80e04c1a3b5a0de8e666155ab4ecb2697a77d) --- crypto/evp/e_aes.c | 2 +- crypto/evp/e_camellia.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/evp') diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index 0890d06c36..30d44ef2a2 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -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; } diff --git a/crypto/evp/e_camellia.c b/crypto/evp/e_camellia.c index 1b758c73fc..d6f4a586f6 100644 --- a/crypto/evp/e_camellia.c +++ b/crypto/evp/e_camellia.c @@ -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; } -- cgit v1.2.3