PHP curl获得协商的TLS版本

时间:2016-02-03 15:33:09

标签: php ssl curl

我正在尝试检查我的请求是否使用TLS版本> 1。虽然curl命令行在详细输出中给我这个信息,但php似乎不是。

这是我启动连接时的PHP curl详细输出

* About to connect() to *** port 443 (#0)
*   Trying 88.*.*.*... * connected
* Connected to *** (88.*.*.*) port 443 (#0)
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*   subject: ***
*   start date: Dec 21 18:43:21 2015 GMT
*   expire date: Dec 21 18:38:18 2016 GMT
*   common name: ***
*   issuer: CN=Verizon Akamai SureServer CA G14-SHA2,OU=Cybertrust,O=Verizon Enterprise Solutions,L=Amsterdam,C=NL
* Server auth using Basic with user '***'
> GET /my/path HTTP/1.1
Authorization: ***
Host: ***
Accept: */*

< HTTP/1.1 200 OK
< Server: ***
< Content-Type: application/json;charset=utf-8
< Content-Length: 3733
< Expires: Wed, 03 Feb 2016 15:24:49 GMT
< Cache-Control: max-age=0, no-cache, no-store
< Pragma: no-cache
< Date: Wed, 03 Feb 2016 15:24:49 GMT
< Connection: keep-alive
<
* Connection #0 to host *** left intact
* Closing connection #0

如何说出连接中使用的TLS是什么?我想避免使用任何第三方选项,例如向https://www.howsmyssl.com/a/check

发出请求

0 个答案:

没有答案