Troubleshooting Ignored CURLOPT_SSL_VERIFYPEER in PHP CURL
Problem:
Users are encountering an issue where HTTPS requests using CURL raise a "Problem with the SSL CA cert" error, despite将curlopt_ssl_verifypeer和curlopt_ssl_verifyhost设置为false。
原因和解决方案:Additionally:
CURLOPT_SSL_VERIFYHOSTSet to 1 to check common name existence in the SSL peer certificate.
Set to 2 to check common name existence并将其与提供的主机名匹配。Ensure that the CA certificate file is valid and accessible by the server.
The curl.cainfo setting in php.ini can also用于指定CA证书文件。
rename/etc/pki/nssdb to/etc/pki/nssdb.old to reset证书权限。免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3