OpenSSL - 哪个证书是 CA 证书?

OpenSSL - 哪个证书是 CA 证书?

我正在尝试下载 CA 证书以与我的 cURL PHP 程序一起使用,以便我可以在本地验证服务器。我正在使用以下命令,但我得到的证书列表太多,无法确定哪一个是正确的。

openssl s_client -connect maps.google.com:443 -showcerts

我从该命令获得的输出如下:

CONNECTED(00000003)
depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=google.com
   i:/C=US/O=Google Inc/CN=Google Internet Authority G2
-----BEGIN CERTIFICATE-----
MIIgVDCCHzygAwIBAgIILAlPBKryu1UwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTYxMDI2MDk1NTAwWhcNMTcwMTE4MDk1NTAw
WjBkMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzETMBEGA1UEAwwKZ29v
Z2xlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK1a3MhaJK1X
M/GUPIgXcmk4EIBaGQ7yxEJ+tPcKBk9ezIII2Ey91EEF61inpGBQmOJnJKVTbdHp
5ATMv7mA2y+WunhjR5hYTLj+1rCHe3UzJEG9KWCUNFS4DNq4k0RtK9HNUaLVk4RR
j5xzKcdnqHZ2STEGnLvKNBvjPm+wvGdU7MffsNNDNJczlCHEOthGZzSrfMmOI/Ep
BfC7Y4Ffd0tSX8cb4CjoTdH8KRYj+iHhvFYUWWz2haZPCoxhmQcl7PV/m0/6UZ5V
gscD2EqRQe4rLndlWA0FNWN3xE9vsK5TbEI4vUBEqZ54NBUFlKoNtaC12CTLhlXT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6spdleHm2SwaesSDWB+eXknGVpzYekQVA/LlelkVESWA6MCaGs
eqQSpSfzmhCXfVUDBvdmWF9fZOGrXW2lOUh1mEwpWjqN0yvKnFUEv/TmFNWArCbt
F4mmk2xcpMy48GaOZON9muIAs0nH5Aqq3VuDx3CQRk6+0NtZlmwu9RY23nHMAcIS
wSHGFg==
-----END CERTIFICATE-----
 2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
   i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
-----BEGIN CERTIFICATE-----
MIIDfTCCAuagAwIBAgIDErvmMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT
MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0
aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDIwNTIxMDQwMDAwWhcNMTgwODIxMDQwMDAw
WjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UE
AxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9m
OSm9BXiLnTjoBbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIu
T8rxh0PBFpVXLVDviS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6c
JmTM386DGXHKTubU1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmR
Cw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5asz
PeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo4HwMIHtMB8GA1UdIwQYMBaAFEjm
aPkr0rKV10fYIyAQTzOYkJ/UMB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrM
TjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjA6BgNVHR8EMzAxMC+g
LaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxzL3NlY3VyZWNhLmNybDBO
BgNVHSAERzBFMEMGBFUdIAAwOzA5BggrBgEFBQcCARYtaHR0cHM6Ly93d3cuZ2Vv
dHJ1c3QuY29tL3Jlc291cmNlcy9yZXBvc2l0b3J5MA0GCSqGSIb3DQEBBQUAA4GB
AHbhEm5OSxYShjAGsoEIz/AIx8dxfmbuwu3UOx//8PDITtZDOLC5MH0Y0FWDomrL
NhGc6Ehmo21/uBPUR/6LWlxz/K7ZGzIZOKuXNBSqltLroxwUCEm2u+WR74M26x1W
b8ravHNjkOR/ez4iyz0H7V84dJzjA1BOoa+Y7mHyhD8S
-----END CERTIFICATE-----
---
Server certificate
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=google.com
issuer=/C=US/O=Google Inc/CN=Google Internet Authority G2
---
No client certificate CA names sent
---
SSL handshake has read 10364 bytes and written 456 bytes
---
New, TLSv1/SSLv3, Cipher is AES128-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : AES128-SHA
    Session-ID: 4083BF08C73AE573B7A4E9D8FE1A56169B84EDF192A956D34035785106593C53
    Session-ID-ctx: 
    Master-Key: 7366BCF9D518917DDBC4444DF52DA1E6BA6DBB75AC05C2BEC07B8230F16815F7176A4BC2B72E85A9A07874CD2AD36C79
    Key-Arg   : None
    Start Time: 1478635083
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---
read:errno=0

我正在使用的教程:

http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

答案1

都不是。通常 TLS 服务器只发送中间 CA;它们不要发送根 CA,因为他们可以安全地假设:

  • 它已经存在于客户端的信任锚(受信任的 CA)列表中,因此没有必要
  • 如果不存在,则意味着客户端没有相信它,因此包括它不会改变任何事情。

一般来说,最可靠的选择是使用Mozilla CA 证书包,其拥有可用于验证大多数网站的 CA 证书。

如果由于某种原因你不能使用它,那么首先看看最后的证书链中的证书(Equifax 颁发的 GeoTrust),然后找到其发行人(Equifax)添加到系统的 CA 列表中,并提取保存到一个文件。

(虽然从技术上讲中间 CA 也可以充当信任锚,但旧版 OpenSSL 仅接受根 CA。)

相关内容