replace ERR_NUM_ERRORS with PHP_OPENSSL_ERR_BUFFER_SIZE#21579
Merged
bukka merged 1 commit intophp:masterfrom Apr 2, 2026
Merged
replace ERR_NUM_ERRORS with PHP_OPENSSL_ERR_BUFFER_SIZE#21579bukka merged 1 commit intophp:masterfrom
bukka merged 1 commit intophp:masterfrom
Conversation
iluuu1994
approved these changes
Mar 31, 2026
Member
iluuu1994
left a comment
There was a problem hiding this comment.
Disclosure: I don't know OpenSSL well.
Looks like php_openssl_errors is modeled after ERR_STATE, which became opaque, thus hiding ERR_NUM_ERRORS. I looked at how OPENSSL_G(errors) is used and there don't seem to be any cases where diverging buffer sizes would be problematic.
bukka
approved these changes
Apr 2, 2026
Member
bukka
left a comment
There was a problem hiding this comment.
This looks fine. We might consider targeting lower branches depending how much we will need to change for OpenSSL 4 (meaning if we support it on stable branches). I guess it is fine for master for now and we can backport later...
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.
The latest version of OpenSSL removed
ERR_NUM_ERRORSfrom the public API thus we cannot rely on it anymore.Fixes #21382