我在这个问题上停留了大约一天,这是我最后的希望。我正在尝试与gov(税)建立连接,因此必须在服务器上卷曲所有必需的数据和证书。但是,我似乎无法解决这个问题,因为我不知道根本的问题是什么-证书或其他问题。
通讯:
* Trying [REMOTE_IP]...
* TCP_NODELAY set
* Connected to [REMOTE_DNS] ([REMOTE_IP]) port 9002 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
CAfile: [CERT_LOCATION]
CApath: none
* error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
* stopped the pause stream!
* Closing connection 0
我用来创建请求的代码:
$conn = curl_init();
$settings = array(
CURLOPT_URL => $this->url2post,
CURLOPT_FRESH_CONNECT => true,
CURLOPT_CONNECTTIMEOUT_MS => 3000,
CURLOPT_TIMEOUT_MS => 3000,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => 1,
CURLOPT_HTTPHEADER => $this->urlPostHeader,
CURLOPT_POSTFIELDS => $this->xmlMessage,
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_SSLCERT => $this->myCertificatePathPem,
CURLOPT_SSLCERTPASSWD => $this->myCertificatePassword,
CURLOPT_CAINFO => $this->fursCertificatePath,
CURLOPT_SSLVERSION => 6,
CURLOPT_VERBOSE => true,
CURLOPT_STDERR => $verbose
);
也:我必须使用gov要求的TLS 1.2
我将不胜感激!