It's possible to do this using "openssl s_client -showcerts". You can see an example if you look at the source of the s_client command (apps/s_client.c) --- call SSL_get_peer_certificate() or SSL_get_peer_cert_chain(), then do what you want with the returned cert (e.g. PEM_write_bio_X509()).
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openss...@openssl.org
Automated List Manager majo...@openssl.org