summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsg <>2014-04-17 07:23:14 +0000
committerjsg <>2014-04-17 07:23:14 +0000
commitcb645cc226c3965e2b748026a6a018007a6e1798 (patch)
treebdb5e19938767df648bedd60ae31809209b6bd74 /src
parentaf4d9e1a4a7d4d4aa7b61e88d1a6791ecd3ef9c5 (diff)
downloadopenbsd-cb645cc226c3965e2b748026a6a018007a6e1798.tar.gz
openbsd-cb645cc226c3965e2b748026a6a018007a6e1798.tar.bz2
openbsd-cb645cc226c3965e2b748026a6a018007a6e1798.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.c2
-rw-r--r--src/lib/libssl/src/crypto/evp/e_aes.c2
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}