lrving77 2019-11-13 18:08 采纳率: 0%
浏览 2599

curl: (60) SSL certificate problem: self signed certificate

在ubuntu18.04中使用curl访问报错如下:

ubuntu@nginx:~$ curl  https://10.10.10.100:9997/playwpt/admin
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

按照网络上的教程进行了设置:
从curl官方网站,下载根证书:cacert.pem ,然后修改php.ini中加入该证书,并重启web服务。
在php.ini中加入

[SSL]
curl.cainfo = "/etc/php/7.2/cacert.pem"
openssl.cafile = "${curl.cainfo}"

我按照上述方法设置后,再次访问时还是出现相同的报错,请问这个如何解决,谢谢!

  • 写回答

1条回答 默认 最新

  • churuxu 2019-11-14 10:54
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥50 汇编语言除法溢出问题
  • ¥65 C++实现删除N个数据列表共有的元素
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波