Skip to content

Fix EVP_Digest{Sign,Verify}Final() and EVP_Digest{Sign,Verify}() for provider only keys#10806

Closed
levitte wants to merge 2 commits intoopenssl:masterfrom
levitte:fix-evp_digestsign-and-evp_digestverify-2
Closed

Fix EVP_Digest{Sign,Verify}Final() and EVP_Digest{Sign,Verify}() for provider only keys#10806
levitte wants to merge 2 commits intoopenssl:masterfrom
levitte:fix-evp_digestsign-and-evp_digestverify-2

Conversation

@levitte
Copy link
Member

@levitte levitte commented Jan 10, 2020

For provider only keys where the initialization didn't catch, we may
end up crashing because the legacy code path didn't check that it had
support carefully enough. This only happens if the caller didn't
check if initialization worked or not.

For the one-shot case, it's very simply handling the case where the
key has no legacy implementation an fall back to the standard
init+update+final mechanism.

…provider only keys

For provider only keys where the initialization didn't catch, we may
end up crashing because the legacy code path didn't check that it had
support carefully enough.  This only happens if the caller didn't
check if initialization worked or not.

For the one-shot case, it's very simply handling the case where the
key has no legacy implementation an fall back to the standard
init+update+final mechanism.
@levitte levitte added branch: master Applies to master branch approval: review pending This pull request needs review by a committer labels Jan 10, 2020
@levitte
Copy link
Member Author

levitte commented Jan 10, 2020

This fixes more test crashes for #10797

…}() for provider only keys

While at it, EVP_DigestSignFinal() and EVP_DigestVerifyFinal() got a
slight code cleanup.
@levitte
Copy link
Member Author

levitte commented Jan 13, 2020

Travis failure not relevant

@levitte
Copy link
Member Author

levitte commented Jan 13, 2020

Final review, anyone?

@mattcaswell mattcaswell added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Jan 13, 2020
@levitte
Copy link
Member Author

levitte commented Jan 14, 2020

Merged.

8f020c3 Fix EVP_Digest{Sign,Verify}Final() and EVP_Digest{Sign,Verify}() for provider only keys

@levitte levitte closed this Jan 14, 2020
openssl-machine pushed a commit that referenced this pull request Jan 14, 2020
…provider only keys

For provider only keys where the initialization didn't catch, we may
end up crashing because the legacy code path didn't check that it had
support carefully enough.  This only happens if the caller didn't
check if initialization worked or not.

For the one-shot case, it's very simply handling the case where the
key has no legacy implementation an fall back to the standard
init+update+final mechanism.

While at it, EVP_DigestSignFinal() and EVP_DigestVerifyFinal() got a
slight code cleanup.

Reviewed-by: Matt Caswell <[email protected]>
(Merged from #10806)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants