gpt4 book ai didi

c - 打开SSL : error "self signed certificate in certificate chain"

转载 作者:IT王子 更新时间:2023-10-29 00:18:24 31 4
gpt4 key购买 nike

当我使用 openssl API 验证服务器证书(自签名)时,出现以下错误:

error 19 at 1 depth lookup:self signed certificate in certificate chain

根据 openssl documentation , 这个错误 (19) 是

"X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self signed certificate in certificate chain - the certificate chain could be built up using the untrusted certificates but the root could not be found locally."

为什么会出现这个错误?我的服务器证书有问题吗?

最佳答案

您有一个自签名的证书,因此默认情况下它是不受信任的,这就是 OpenSSL 提示的原因。这个警告实际上是一件好事,因为这种情况也可能由于 man-in-the-middle attack 而上升。 .

要解决这个问题,您需要将其安装为受信任的服务器。如果它是由不受信任的 CA 签名的,您还必须安装该 CA 的证书。

看看this link关于安装自签名证书。

关于c - 打开SSL : error "self signed certificate in certificate chain",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12180552/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com