Skip to content
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 from

Conversation

kroeckx
Copy link
Member

@kroeckx kroeckx commented Oct 29, 2017

This restores the 1.0.2 behaviour

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

This restores the 1.0.2 behaviour
Copy link
Contributor

@richsalz richsalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put explicit NULL comparision.

@kaduk
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
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
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
Copy link
Member Author

kroeckx commented Oct 30, 2017

Fixed in master an 1.1.0

@kroeckx kroeckx closed this Oct 30, 2017
djmdjm added a commit to openssh/openssh-portable that referenced this pull request Oct 17, 2018
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants