问题原文
原帖链接 · Robert Petz · CC BY-SA 3.0
So I've googled quite a bit for this but it appears that my google-fu fails me - apologies if this is a trivial and already answered question, I could not find anything about this
I'm trying to diagnose an SSL certificate hostname mismatch. When I visit the url in question, it redirects me to another page that has the correct SSL certificate. However, some clients are reporting that they are receiving an SSL certificate hostname mismatch error. My only assumption is that the redirecting page has the wrong certificate and some clients are letting it slide because it resolves with a new page that has the correct certificate.
(The how and why of the issue isn't really the question)
The question:
From the outside in (aka, as a client in the world) - how would one view the certificate that was delivered by a page that automatically redirects to another page?
已采纳解答
原帖链接 · EEAA · CC BY-SA 4.0
Use openssl s_client piped to openssl x509:
$ openssl s_client -connect foo.example.com:443 < /dev/null | openssl x509 -text
(Add -servername foo.example.com to the s_client command if the server uses SNI.)
The redirection of stdin from /dev/null for the first invocation of openssl will prevent it from hanging waiting for input.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
