提交 a7f9e0a4 编写于 作者: M Matt Caswell

Remove an unneccessary check of cipher

Due to short-circuiting we only need to check "cipher" for NULL once.

PR#699
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 49445f21
...@@ -120,7 +120,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ...@@ -120,7 +120,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
* reinitialisation, when it may all be unnecessary. * reinitialisation, when it may all be unnecessary.
*/ */
if (ctx->engine && ctx->cipher if (ctx->engine && ctx->cipher
&& (!cipher || (cipher && (cipher->nid == ctx->cipher->nid)))) && (cipher == NULL || cipher->nid == ctx->cipher->nid))
goto skip_to_init; goto skip_to_init;
#endif #endif
if (cipher) { if (cipher) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册