replace ERR_NUM_ERRORS with PHP_OPENSSL_ERR_BUFFER_SIZE#21579
replace ERR_NUM_ERRORS with PHP_OPENSSL_ERR_BUFFER_SIZE#21579bukka merged 1 commit intophp:masterfrom
Conversation
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
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...
|
@bukka I think it is time to apply in 8.3+ (OpenSSL 4.0 coming to Fedora, and build fails because of this) For memory, https://copr.fedorainfracloud.org/coprs/yselkowitz/openssl-4.0/monitor/ (test build of all Fedora packages) |
The latest version of OpenSSL removed
ERR_NUM_ERRORSfrom the public API thus we cannot rely on it anymore.Fixes #21382