SSL:当我通过浏览器检查时,我得到了购买的 godaddy 证书,但是当我使用 openssl 检查时,我得到了自签名证书?
我有一个网站,该网站拥有 Godaddy 提供的有效通配符证书。当我在浏览器中查看它时,我获得了一个有效的安全证书(绿色挂锁),当我在浏览器中检查证书时,它显示安全并由 godaddy 签名,一切看起来都正常。
但是,如果我使用 openssl s_client -connect my.site.com:443
我会得到一个自签名证书:
发行人=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
我不明白这是为什么。我的一些用户似乎存在问题,他们的浏览器中存在 ssl 自签名错误,我认为这与此有关。
我正在使用 Ubuntu 11.04 和 apache2。有什么想法为什么会出现这种情况,或者我如何进一步检查这个问题?
I have a website that has a valid wildcard certificate from Godaddy. When I view it in my browser I get a valid secure certificate (green padlock) and when I examine the certificate within the browser it says secure and signed by godaddy and everything appears normal.
However, if I use openssl s_client -connect my.site.com:443
I get a self signed certificate:
issuer=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
I don't understand why this is. There seems to be an issue with some of my users that have ssl self-signed errors within their browsers and I think this has something to do with it.
I'm using Ubuntu 11.04 with apache2. Any ideas why this is the case, or how I could further examine the issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
OpenSSL 的一般问题是它没有预先配置一组受信任的 CA 证书(与您的浏览器不同)。 您需要使用
-CApath
或-CAfile
指定它。您的用户可能面临的另一个常见问题是您可能缺少中间 CA 证书。服务器提供的证书链(您确实可以使用
openssl s_client
检查,如果您想要完整的详细信息,可能使用-showcerts
)需要以正确的顺序显示,从主机证书到根 CA(不包括根 CA,尽管我在实践中注意到拥有它并没有什么坏处),因此一个证书的颁发者 DN 是下一个证书的主题 DN(直到颁发者 DN 是主题)您信任的 CA 之一的 DN)。The general issue with OpenSSL is that it's not pre-configured with a set of trusted CA certificates (unlike your browser). You need to specify it with
-CApath
or-CAfile
.Another common problem that your users may be facing is that you may be missing intermediate CA certificates. The certificate chain presented by your server (which you can indeed check using
openssl s_client
, possibly with-showcerts
if you want the full details) needs to be presented in the right order, from host certificate to root CA (excluding the root CA, although I've noticed in practice it doesn't hurt to have it), so the one certificate's issuer DN is the next certificate's subject DN (until the issuer DN is the subject DN of one of your trusted CAs).