New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only reset the ctx when a cipher is given #4613

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@kroeckx
Copy link
Member

kroeckx commented Oct 29, 2017

This restores the 1.0.2 behaviour

This was pointed out by @davidben in openssh/openssh-portable#48 (comment)

Only reset the ctx when a cipher is given
This restores the 1.0.2 behaviour
@richsalz
Copy link
Contributor

richsalz left a comment

approved either way.

@@ -50,7 +50,8 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
const unsigned char *key, const unsigned char *iv, int enc)
{
EVP_CIPHER_CTX_reset(ctx);
if (cipher)

This comment has been minimized.

@richsalz

richsalz Oct 29, 2017

Contributor

Please put explicit NULL comparision.

@kaduk

This comment has been minimized.

Copy link
Contributor

kaduk commented Oct 30, 2017

This is for 1.1.0 and master?
(+1 from me)

levitte pushed a commit that referenced this pull request Oct 30, 2017

Only reset the ctx when a cipher is given
This restores the 1.0.2 behaviour

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Benjamin Kaduk <bkaduk@akamai.com>
GH: #4613

levitte pushed a commit that referenced this pull request Oct 30, 2017

Only reset the ctx when a cipher is given
This restores the 1.0.2 behaviour

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Benjamin Kaduk <bkaduk@akamai.com>
GH: #4613
(cherry picked from commit ffd2320)
@kroeckx

This comment has been minimized.

Copy link
Member

kroeckx commented Oct 30, 2017

Fixed in master an 1.1.0

@kroeckx kroeckx closed this Oct 30, 2017

richsalz added a commit to richsalz/openssl that referenced this pull request Nov 12, 2017

Only reset the ctx when a cipher is given
This restores the 1.0.2 behaviour

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Benjamin Kaduk <bkaduk@akamai.com>
GH: openssl#4613

djmdjm added a commit to openssh/openssh-portable that referenced this pull request Oct 17, 2018

Require OpenSSL 1.1.x series 1.1.0g or greater
Previous versions have a bug with EVP_CipherInit() when passed a
NULL EVP_CIPHER, per openssl/openssl#4613

ok dtucker@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment