As per my understanding , openssl will verify the certificate of the server during ssl handshake , using the trusted CAs present in the CA certificate dir in the context. After the server certificate is verified and handshake is done , does the openssl cache/store the verified server certificate?
1 Answer
The certificate is available as long the SSL connection is open by calling SSL_get_peer_certificate, see https://www.openssl.org/docs/ssl/SSL_get_peer_certificate.html. It is no longer available after SSL close.