我上的是RHEL 6.9
当我运行命令sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc时
我收到以下信息
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,有没有办法使它成为默认的系统证书?它能解决这个问题吗?发布于 2018-05-24 23:05:31
您需要将证书以PEM格式添加到/etc/pki/ca-trust/source/anchors/,然后运行
# sudo update-ca-trust这将将证书导入Redhat信任存储。在使用以下命令运行上述命令之前,还可能需要启用信任存储:
# update-ca-trust enable要将密钥转换为PEM格式,请查看以下链接:如何将SSL/TLS证书从..crt转换为..pem格式
有关将密钥添加到信任库的Redhat的进一步信息,这并不涉及转换为PEM格式,但这完全取决于您的CRT的原始格式。
https://unix.stackexchange.com/questions/445882
复制相似问题