Call BIO_gets in a loop until no more data can be read #79300
Merged
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.
This changes our use of
BIO_gets
to read in a loop until there is no more data left to be read. Our current use ofBIO_gets
assumes it is going to get all of the data in one go.This however leaves us with an interesting question of what we want to do with the
multiline
parameter, which we currently ignore inOpenSslAsnFormatter
. If you specify "multiline = false
" in the Linux implementation, we are going to give you back a string that contains multiple lines, anyway.We could do something like, "only return up to the first newline, and if you want all of it then you need to pass
true
". However for some extensions such cRLDistributionPoints, the single-line answer is confusing and unhelpful.The managed implementation also ignores the
multiline
parameter, but it also doesn't support anything other than SANs.Fixes #79265