问题原文
原帖链接 · Mike Stan · CC BY-SA 3.0
I am fetching a certificate chain with openssl s_client -showcerts -connect host.whatever:443 </dev/null.
In addition to that I would like to extract the root certificate form the chain programmatically in the format -----BEGIN CERTIFICATE-----.....-----END CERTIFICATE-----
Does anybody know of a functionality that is capable of that and already ships with OpenSSL?
已采纳解答
原帖链接 · Steffen Ullrich · CC BY-SA 3.0
openssl s_client shows you only the certificate chain send by the client. This chain usually does not include the root certificate itself. Instead the root certificate is only contained in the local trust store and is not send by the server. As far as I know there is no builtin way to get the root certificate for a connection using the openssl command line.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
