PKCS7: accept any BIO type for detached content in PKCS7_verify - #11373
Open
kojo1 wants to merge 2 commits into
Open
PKCS7: accept any BIO type for detached content in PKCS7_verify#11373kojo1 wants to merge 2 commits into
kojo1 wants to merge 2 commits into
Conversation
|
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.
Description
wolfSSL_PKCS7_verify() pulled the detached content out of the input
BIO with wolfSSL_BIO_get_mem_data(), which only handles memory BIOs.
With a file BIO it returned 0 bytes instead of an error, so the
content was treated as empty and verification failed. The returned
pointer also came from the WOLFSSL_BIO ptr union, which holds the
XFILE handle for a file BIO.
Fixes zd#22345
Testing
Added test_wolfSSL_PKCS7_verify_detached_bio()
Checklist