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