访问https报Unknown SSL protocol error in connection to错误
网站升级httsp后,用curl访问,长时间不返回结果,报ssl handshake 协议错误,具体如下。
原因是curl版本太旧,可以使用curl的--sslv3参数,或者升级curl本本。
$ curl -v https://www.redis.com.cn/shengqi/ --user-agent "Mozilla/5.0" --silent
* timeout on name lookup is not supported
* Trying 47.52.250.55...
* TCP_NODELAY set
* Connected to www.redis.com.cn (47.52.250.55) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* Unknown SSL protocol error in connection to www.redis.com.cn:443
* Curl_http_done: called premature == 1
* stopped the pause stream!
* Closing connection 0