How to get SSL chain certificates from an https server
openssl s_client -showcerts -connect www.domain.com:443