On Mon, Nov 19, 2001 at 11:56:05PM -0800, ct l wrote: > During peer cert verification stage, I need to store > the peer cert info in PEM file format for future > reference. > > May I know: Based on info in ssl->cert, what fields > and how should I arrange the fields so that I can > store the peer cert as a PEM file for future > verification ? The intention is to store this file so > that it can be used in load_verify_location.
Do not access members of the SSL object (ssl->...) directly, as these structures may change. Please use the offical API SSL_get_peer_certificate(), SSL_get_peer_cert_chain() to obtain the X509 objects. You can then simply write them to file using the PEM_write_X509()/PEM_write_bio_X509() function. Best regards, Lutz -- Lutz Jaenicke [EMAIL PROTECTED] BTU Cottbus http://www.aet.TU-Cottbus.DE/personen/jaenicke/ Lehrstuhl Allgemeine Elektrotechnik Tel. +49 355 69-4129 Universitaetsplatz 3-4, D-03044 Cottbus Fax. +49 355 69-4153 ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]