Look at openssl-*/apps/x509.c Arun
-----Original Message----- From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Dallas Clement Sent: Wednesday, June 02, 2010 9:50 AM To: openssl-users@openssl.org Subject: printing a certificate Hi, Would someone kindly tutor me on how to print out a certificate programmatically? I know how to extract the common name, but was just wondering if there is an API function to just print the whole thing in human readable form? X509 *pX509Peer = SSL_get_peer_certificate( pSsl ); if ( pX509Peer != 0 ) { // Extract the common name from the peer's certificate X509_NAME_get_text_by_NID( X509_get_subject_name( pX509Peer ), NID_commonName, commonName, commonNameBufferSize ); Thanks, Dallas ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org