当前位置:网站首页>centso7 openssl 报错Verify return code: 20 (unable to get local issuer certificate)
centso7 openssl 报错Verify return code: 20 (unable to get local issuer certificate)
2022-07-07 11:09:00 【白杨攻城狮】
问题重现:
由于centos7 默认的openssl的版本为1.1.0k,本人编译媒体服务时,需要openssl版本1.1.1以上,所有删除的之前的低版本openssl,手动编译了一个1.1.1k的版本,媒体服务正常运行,并且CA验证正常。
结果昨天晚上服务器断电重启后,当我在获取电信MQ数据时,openssl一直报错,Unhandled exception. System.Security.Authentication.AuthenticationException:The remote certificate was rejected by the provided RemoteCertificateValidat
使用openssl的命令测试连接状态:
openssl s_client -connect msgpush.ctwing.cn:16651
得到以下结果:
提示,无法加载本地证书。使用了各种方案,编译各种版本的openssl,还是不行。
百般无奈下,只能分析线上环境的openssl(线上为云服务器,openssl为1.02K)与本地服务器的openssl的区别,又经历了痛苦的几个小时。终于在查看openssl 版本的命令中,看出了端倪,这个命令很重要:
openssl version -d
线上打印的结果:
本地服务器的结果:
进入线上环境openssl 的目录:执行命令
ll
显示结果:
关键点就这个目录,看我标红的部分,这里的软链接就是证书的位置
我们再来看,本地服务器
可以看到,并没有看到证书的软链接,
所以一切的原因就是这里,没有告诉系统openssl使用的证书位置。所以我们创建一个软链接即可。
ln -s /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem cert.pem
执行结果如下:
当我们再次使用openssl的测试命令时:成功了,
边栏推荐
- Layer pop-up layer closing problem
- 2022 practice questions and mock examination of the third batch of Guangdong Provincial Safety Officer a certificate (main person in charge)
- Shortcut key of Bash
- layer弹出层的关闭问题
- 滑轨步进电机调试(全国海洋航行器大赛)(STM32主控)
- PHP calls the pure IP database to return the specific address
- leecode3. 无重复字符的最长子串
- CMU15445 (Fall 2019) 之 Project#2 - Hash Table 详解
- Leetcode question brushing: binary tree 26 (insertion operation in binary search tree)
- 【无标题】
猜你喜欢
《开源圆桌派》第十一期“冰与火之歌”——如何平衡开源与安全间的天然矛盾?
《ASP.NET Core 6框架揭秘》样章[200页/5章]
TPG x AIDU|AI领军人才招募计划进行中!
Differences between MySQL storage engine MyISAM and InnoDB
3D content generation based on nerf
How to apply @transactional transaction annotation to perfection?
Isprs2021/ remote sensing image cloud detection: a geographic information driven method and a new large-scale remote sensing cloud / snow detection data set
ICLR 2022 | pre training language model based on anti self attention mechanism
AUTOCAD——大于180度的角度标注、CAD直径符号怎么输入?
.Net下极限生产力之efcore分表分库全自动化迁移CodeFirst
随机推荐
如何让electorn打开的新窗口在window任务栏上面
红杉中国完成新一期90亿美元基金募集
How to continue after handling chain interruption / sub chain error removed from scheduling
COSCon'22 社区召集令来啦!Open the World,邀请所有社区一起拥抱开源,打开新世界~
xshell评估期已过怎么办
[learn wechat from 0] [00] Course Overview
Grep of three swordsmen in text processing
DrawerLayout禁止侧滑显示
怎样重置火狐浏览器
谷歌浏览器如何重置?谷歌浏览器恢复默认设置?
学习突围2 - 关于高效学习的方法
《ASP.NET Core 6框架揭秘》样章[200页/5章]
layer弹出层的关闭问题
What kind of methods or functions can you view the laravel version of a project?
Awk of three swordsmen in text processing
.Net下極限生產力之efcore分錶分庫全自動化遷移CodeFirst
How does MySQL create, delete, and view indexes?
通过Keil如何查看MCU的RAM与ROM使用情况
Cmu15445 (fall 2019) project 2 - hash table details
[learn microservice from 0] [01] what is microservice