我们有一个用于公司工作流程的 GoDaddy 网站。它的一些功能使用 PHP cURL 通过 REST API 与我们的 Atlassian/Jira 域集成。一周前,一切正常,但在最后一周,只有在通过 GoDaddy 连接到我们的 Atlassian/Jira 域时,我们所有的 cURL 方法才会失败。相同的方法适用于本地主机和其他主机,如 000webhosting。
我试过了:
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_CONNECTTIMEOUT => 20,
CURLOPT_TIMEOUT => 20
还尝试将基本身份验证设置为标头而不是 CURLOPT_USERPWD。
CURLOPT_HEADER 返回一个数组,该数组只有“url”属性的值,其他所有内容都是 0 或空,甚至是 http 状态。curl_exec 的结果也是空的。curl_getinfo 显示与 CURLOPT_HEADER 相同的信息,只包含 URL 和其他所有内容为空。
cURL 适用于 Google 等其他 URL。
我们在豪华共享主机上。
我们的认证格式:基本的“[email protected]:API_TOKEN”
卷曲信息示例:
Array
(
[url] => (das a secret)
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 2.215
[namelookup_time] => 0.046
[connect_time] => 0.046
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)
[primary_ip] => xx.xxx.xxx.xx
[primary_port] => 443
[local_ip] => xxx.xx.xxx.xxx
[local_port] => xxxxx
[redirect_url] =>
)
更新:使用 curl_error() 发现此错误:: error:14077410:SSLroutines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
发现问题,我们的 php curl (5.3) 在 curl_setopt() -> CURLOPT_SSLVERSION 中不支持 TLS 1.2
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句