首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何用本地公司更新ca-bundle.crt -root.crt

如何用本地公司更新ca-bundle.crt -root.crt
EN

Unix & Linux用户
提问于 2018-05-24 22:48:45
回答 1查看 10.1K关注 0票数 2

我上的是RHEL 6.9

当我运行命令sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

我收到以下信息

代码语言:javascript
复制
 curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, 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.
error: https://packages.microsoft.com/keys/microsoft.asc: import read failed(2).

我尝试过使用-k--insecure,但都失败了,比如--inecure: unknown option

我在公司防火墙后面,拦截所有TLS/SSL证书,并将其替换为自己的证书。

问:我该如何解决这个问题?

  • 我的桌面上有一家公司的rootCert.crt,有没有办法使它成为默认的系统证书?它能解决这个问题吗?
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2018-05-24 23:05:31

您需要将证书以PEM格式添加到/etc/pki/ca-trust/source/anchors/,然后运行

代码语言:javascript
复制
# sudo update-ca-trust

这将将证书导入Redhat信任存储。在使用以下命令运行上述命令之前,还可能需要启用信任存储:

代码语言:javascript
复制
# update-ca-trust enable

要将密钥转换为PEM格式,请查看以下链接:如何将SSL/TLS证书从..crt转换为..pem格式

有关将密钥添加到信任库的Redhat的进一步信息,这并不涉及转换为PEM格式,但这完全取决于您的CRT的原始格式。

如何在6及更高版本上安装CA证书

票数 3
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/445882

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档