When I used CURL in PHP, I encountered the following error.
"OpenSSL/3.0.13: error:0A000152:SSL routines::unsafe legacy renegotiation disabled"
I tried many methods, but none of them worked.
For example:
-- Setting CURL parameters in PHP
CURLOPT_SSL_OPTIONS => CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE
-- Setting OPENSSL_CONF in PHP
putenv("OPENSSL_CONF=/usr/home/{USER}/domains/{DOMAIN}/public_html/openssl.cnf");
--- OpenSSL.cnf file content
[system_default_sect]
Options = UnsafeLegacyServerConnect
Also tried
[system_default_sect]
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
CipherString = DEFAULT:@SECLEVEL=2
#Options = UnsafeLegacyRenegotiation
Options = UnsafeLegacyServerConnect
Also tried
nodejs_conf = openssl_init
[openssl_init]
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
Options = UnsafeLegacyRenegotiation
None of them worked. How can I solve this problem?