From d824cdf417f03115407ab2445f485eb2190d2447 Mon Sep 17 00:00:00 2001 From: jsg <> Date: Thu, 17 Apr 2014 07:23:14 +0000 Subject: call the correct decrypt function in aes_cbc_cipher() From: commit e9c80e04c1a3b5a0de8e666155ab4ecb2697a77d Author: Andy Polyakov Date: Wed Dec 18 21:42:46 2013 +0100 evp/e_[aes|camellia].c: fix typo in CBC subroutine. It worked because it was never called. Our e_camellia.c does not have this problem. ok miod@ deraadt@ --- src/lib/libcrypto/evp/e_aes.c | 2 +- src/lib/libssl/src/crypto/evp/e_aes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index c7869b69ef..c7eaafe89b 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c @@ -581,7 +581,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/src/lib/libssl/src/crypto/evp/e_aes.c b/src/lib/libssl/src/crypto/evp/e_aes.c index c7869b69ef..c7eaafe89b 100644 --- a/src/lib/libssl/src/crypto/evp/e_aes.c +++ b/src/lib/libssl/src/crypto/evp/e_aes.c @@ -581,7 +581,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; } -- cgit v1.2.3-55-g6feb