openssl s_client -connect some.https.server:443 -showcerts
is a nice command to run when you want to inspect the server's certificates and its certificate chain.
Is there a way to run this command when you are behind a HTTP/HTTPS proxy ?
Officially not.
But here's a patch: http://rt.openssl.org/Ticket/Display.html?id=2651&user=guest&pass=guest