View certificates of a remote server with OpenSSL

openssl s_client -showcerts -connect google.com:443