diff options
author | Todd Short <tshort@akamai.com> | 2016-05-24 09:03:25 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-05-24 10:51:14 -0400 |
commit | c01a3c6df038d4cbec87ae658c25b3730c5af88c (patch) | |
tree | aa80a099d615879c03f1cc1194cadb3f6b40c9f9 /crypto/evp/e_aes.c | |
parent | e0a675e211302257256ed80ea1edeff329c9b9e9 (diff) | |
download | openssl-c01a3c6df038d4cbec87ae658c25b3730c5af88c.zip openssl-c01a3c6df038d4cbec87ae658c25b3730c5af88c.tar.gz openssl-c01a3c6df038d4cbec87ae658c25b3730c5af88c.tar.bz2 |
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/evp/e_aes.c')
-rw-r--r-- | crypto/evp/e_aes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index ae39992..cfa65b8 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) { |