projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49445f2
)
Remove an unneccessary check of cipher
author
Matt Caswell
<matt@openssl.org>
Mon, 16 May 2016 13:56:53 +0000
(14:56 +0100)
committer
Matt Caswell
<matt@openssl.org>
Mon, 16 May 2016 19:28:03 +0000
(20:28 +0100)
Due to short-circuiting we only need to check "cipher" for NULL once.
PR#699
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/evp/evp_enc.c
patch
|
blob
|
history
diff --git
a/crypto/evp/evp_enc.c
b/crypto/evp/evp_enc.c
index e02e801949c0eb883ad8def26f63875ec6dda2ed..ad64a74bb415165adf7b6466c58df03fba80dde1 100644
(file)
--- a/
crypto/evp/evp_enc.c
+++ b/
crypto/evp/evp_enc.c
@@
-120,7
+120,7
@@
int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
* reinitialisation, when it may all be unnecessary.
*/
if (ctx->engine && ctx->cipher
- && (
!cipher || (cipher && (cipher->nid == ctx->cipher->nid))
))
+ && (
cipher == NULL || cipher->nid == ctx->cipher->nid
))
goto skip_to_init;
#endif
if (cipher) {