openssl: Check return value of SSL_CTX_set_alpn_protos() - #22996
Conversation
bukka
left a comment
There was a problem hiding this comment.
Hmm looking at https://github.com/openssl/openssl/blob/77f492f29f882e07d57e16920138d991dc9af018/ssl/ssl_lib.c#L3870-L3882 it seems like it might be possible to make it fail (e.g. single letter value so test might be possible if I read it correctly.
Discovered by ESSS.
Yeah, I added a test and adjusted the error type |
bukka
left a comment
There was a problem hiding this comment.
technically it could fail on memdup but such message wouldn't be probably visible anyway so it's better to keep like this.
|
Seems like a bug so should go to 8.4+ |
Yes, I agree, we can't distinguish what exactly failed at the call site so this is the pragmatic approach. |
This particular patch uses the new API |
* PHP-8.5: openssl: Check return value of SSL_CTX_set_alpn_protos() (#22996)
Discovered by ESSS. Closes phpGH-23009.
* PHP-8.4: openssl: Check return value of SSL_CTX_set_alpn_protos() (php#22996)
Discovered by ESSS.