服务器访问https链接报错SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

前段时间,在项目中遇到个很奇怪的问题,有地方同事报错说验证码经常验证失败(https),但我们自己尝试却是正常的,后来在后端保存了调取验证码链接的结果,才发现有两台后端机记录有大量的如下报错:
SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
在这里插入图片描述
大意就是:SSL证书问题,请验证CA证书是否正确,证书验证失败。。。
其它后端服务器却是正常的,没有类似报错。。。。

然后,直接在问题服务器上尝试使用curl 访问链接,报错提示如下:

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). The default
 bundle is named curl-ca-bundle.crt; you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

在这里插入图片描述

经查发现,是因为服务器缺少openssl-devel依赖包,而在调用openssl库文件时,需要使用到openssl-devel包
通过yum install openssl-devel安装依赖包
安装之后便可以正常访问了,emmmm…

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值