Honour mandatory digest on private key in has_usable_cert() (1.1.1 backport of PR#7408)#7609
Closed
dwmw2 wants to merge 2 commits intoopenssl:OpenSSL_1_1_1-stablefrom
Closed
Honour mandatory digest on private key in has_usable_cert() (1.1.1 backport of PR#7408)#7609dwmw2 wants to merge 2 commits intoopenssl:OpenSSL_1_1_1-stablefrom
dwmw2 wants to merge 2 commits intoopenssl:OpenSSL_1_1_1-stablefrom
Conversation
ASN1_PKEY_CTRL_DEFAULT_MD_NID is documented to return 2 for a mandatory digest algorithm, when the key can't support any others. That isn't true here, so return 1 instead. Partially fixes openssl#7348 Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from openssl#7408) (cherry picked from commit eb7eb13)
If the private key says it can only support one specific digest, then don't ask it to perform a different one. Fixes: openssl#7348 Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from openssl#7408) (cherry picked from commit 2d263a4)
mattcaswell
approved these changes
Nov 23, 2018
romen
approved these changes
Nov 24, 2018
levitte
pushed a commit
that referenced
this pull request
Nov 24, 2018
ASN1_PKEY_CTRL_DEFAULT_MD_NID is documented to return 2 for a mandatory digest algorithm, when the key can't support any others. That isn't true here, so return 1 instead. Partially fixes #7348 Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit eb7eb13) Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #7609)
levitte
pushed a commit
that referenced
this pull request
Nov 24, 2018
If the private key says it can only support one specific digest, then don't ask it to perform a different one. Fixes: #7348 Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 2d263a4) Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from #7609)
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stop TLS from using digests that the
EVP_PKEYtells us it doesn't support.And stop the EC keys from lying about what they support, while we're at it.
Fixes #7348