如何在Ubuntu终端上添加SSL

如何在Ubuntu终端上添加SSL,ubuntu,curl,ssl,Ubuntu,Curl,Ssl,在ubuntu终端上从curl运行TwitterAPI时,它要求我使用SSL 在寻找它之后,我试着- sudo curl -s https://localhost:8080/tweets/HLaddha sudo curl -k https://localhost:8080/tweets/HLaddha sudo curl --cert-type SSL https://localhost:8080/tweets/HLaddha openssl s_client -connect face

在ubuntu终端上从curl运行TwitterAPI时,它要求我使用SSL 在寻找它之后,我试着-

sudo curl -s https://localhost:8080/tweets/HLaddha

sudo curl -k https://localhost:8080/tweets/HLaddha

sudo curl --cert-type SSL https://localhost:8080/tweets/HLaddha

openssl s_client -connect facebook.com:443 |tee logfile
sudo curl --cacert logfile https://localhost:8080/tweets/HLaddha
但是我找不到正确的用法。谁能告诉我怎么做我收到的错误信息是-

curl: (35) Unknown SSL protocol error in connection to localhost:8080

不清楚您在问什么,例如localhost:8080与twitter API有什么关系。你确定你在本地主机上有https:8080吗?不,我在本地主机上没有https,这就是为什么我想从curl发出一个安全请求并测试我的api脚本。这就是为什么我问如何在使用curl的时候获得SSL证书或者模拟它。这里没有对证书的模拟,您必须创建证书并设置一个服务器,以便它使用它们。但是已经有足够的文档说明如何做到这一点。