aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2016-05-24 09:03:25 -0400
committerRich Salz <rsalz@openssl.org>2016-05-24 10:51:14 -0400
commitc01a3c6df038d4cbec87ae658c25b3730c5af88c (patch)
treeaa80a099d615879c03f1cc1194cadb3f6b40c9f9 /crypto
parente0a675e211302257256ed80ea1edeff329c9b9e9 (diff)
downloadopenssl-c01a3c6df038d4cbec87ae658c25b3730c5af88c.tar.gz
Fix braces in e_aes.c: aes_init_key
This compiles correctly, but depending on what may be defined, it's possible that this could fail compilation. The braces are mismatched, and it's possible to end up with an else followed by another else. This presumes the indentation is mostly correct and indicative of intent. Found via static analysis. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1118)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/e_aes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index ae399928c1..cfa65b8e33 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -1027,7 +1027,7 @@ static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
mode = EVP_CIPHER_CTX_mode(ctx);
if ((mode == EVP_CIPH_ECB_MODE || mode == EVP_CIPH_CBC_MODE)
- && !enc)
+ && !enc) {
#ifdef HWAES_CAPABLE
if (HWAES_CAPABLE) {
ret = HWAES_set_decrypt_key(key,
@@ -1066,6 +1066,7 @@ static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
dat->block = (block128_f) AES_decrypt;
dat->stream.cbc = mode == EVP_CIPH_CBC_MODE ?
(cbc128_f) AES_cbc_encrypt : NULL;
+ }
} else
#ifdef HWAES_CAPABLE
if (HWAES_CAPABLE) {