I'm trying to understand how to read the output of OpenSSL commands.
Currently, I am trying to understand how Certificate Chains work.
When I give the command (using a standard ca bundle)
openssl s_client -connect www.google.com:443 -CAfile ca-bundle.crt
I get
CONNECTED(00000003)IzJZ5dQUbs0pjW3tAgTAMBgNVHRMBAf8EAjAAMB8GA1Ud
depth=3 /C=US/O=Equifax/OU=Equifax Secure Certificate AuthorityW
verify return:1BAgIwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDovL3BraS5nb29n
depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CAyd2eyQKKxh3vJ
verify return:11cY/EIksH6hXF6EFnS+8vWZs8Ka8FyQi76cUOSqk2ed2DvOeT
depth=1 /C=US/O=Google Inc/CN=Google Internet Authority G2Bii82d
verify return:1UuiFeti7EjUXr0E58NMnBw39Zv6nZaSbppvlLR/jRBKCRB7jB
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.com
verify return:1sfjYdq1K94yLkfe6mUR7Go6JUkD/eB/Aq9KKoSJbJEvvjGIiJ
---MkQ==
Certificate chainATE-----
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.comcom
i:/C=US/O=Google Inc/CN=Google Internet Authority G2G2
1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
---
Server certificateCipher is AES128-SHA
-----BEGIN CERTIFICATE-----it
MIIEgDCCA2igAwIBAgIIMPM39zVrKUkwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIw....
.....
My question is in regard to the Certificate Chain section.
Which is the Root Certificate? The first one listed or the last? Why are they all reported? Isn't one validation enough to move on with?