diff options
| author | jsg <> | 2014-04-17 07:23:14 +0000 | 
|---|---|---|
| committer | jsg <> | 2014-04-17 07:23:14 +0000 | 
| commit | d824cdf417f03115407ab2445f485eb2190d2447 (patch) | |
| tree | bdb5e19938767df648bedd60ae31809209b6bd74 /src | |
| parent | 7819cc1d1d0c28fa641239e19dfce513be4e0610 (diff) | |
| download | openbsd-d824cdf417f03115407ab2445f485eb2190d2447.tar.gz openbsd-d824cdf417f03115407ab2445f485eb2190d2447.tar.bz2 openbsd-d824cdf417f03115407ab2445f485eb2190d2447.zip | |
call the correct decrypt function in aes_cbc_cipher()
From:
commit e9c80e04c1a3b5a0de8e666155ab4ecb2697a77d
Author: Andy Polyakov <appro@openssl.org>
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@
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/evp/e_aes.c | 2 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/evp/e_aes.c | 2 | 
2 files changed, 2 insertions, 2 deletions
| 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, | |||
| 581 | else if (ctx->encrypt) | 581 | else if (ctx->encrypt) | 
| 582 | CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block); | 582 | CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block); | 
| 583 | else | 583 | else | 
| 584 | CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block); | 584 | CRYPTO_cbc128_decrypt(in,out,len,&dat->ks,ctx->iv,dat->block); | 
| 585 | 585 | ||
| 586 | return 1; | 586 | return 1; | 
| 587 | } | 587 | } | 
| 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, | |||
| 581 | else if (ctx->encrypt) | 581 | else if (ctx->encrypt) | 
| 582 | CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block); | 582 | CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block); | 
| 583 | else | 583 | else | 
| 584 | CRYPTO_cbc128_encrypt(in,out,len,&dat->ks,ctx->iv,dat->block); | 584 | CRYPTO_cbc128_decrypt(in,out,len,&dat->ks,ctx->iv,dat->block); | 
| 585 | 585 | ||
| 586 | return 1; | 586 | return 1; | 
| 587 | } | 587 | } | 
