php下curl ssl常用问题

1. 查看curl版本

在phpinfo中,可以查看

 

curl

cURL support enabled
cURL Information 7.35.0
Age 3
Features
AsynchDNS Yes
Debug No
GSS-Negotiate Yes
IDN No
IPv6 Yes
Largefile Yes
NTLM Yes
SPNEGO Yes
SSL Yes
SSPI Yes
krb4 No
libz Yes
CharConv No
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host i386-pc-win32
SSL Version OpenSSL/0.9.8{
ZLib Version 1.2.7
libSSH Version libssh2/1.4.2 

 

1. ssl version对应的数字

CURL_SSLVERSION_DEFAULT (0)
CURL_SSLVERSION_TLSv1 (1)
CURL_SSLVERSION_SSLv2 (2)
CURL_SSLVERSION_SSLv3 (3)
CURL_SSLVERSION_TLSv1_0 (4)
CURL_SSLVERSION_TLSv1_1 (5)
CURL_SSLVERSION_TLSv1_2 (6)

 

2. 检测ssl兼容性的网站

https://www.ssllabs.com/ssltest/

posted @ 2019-03-01 20:16 方倍工作室 阅读(...) 评论(...) 编辑 收藏