Commit 147dbb2f authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Fix for SSL_get_certificate

Now we set the current certificate to the one used by a server
there is no need to call ssl_get_server_send_cert which will
fail if we haven't sent a certificate yet.
parent cbf9b4ae
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2792,9 +2792,7 @@ void ssl_clear_cipher_ctx(SSL *s)
/* Fix this function so that it takes an optional type parameter */
X509 *SSL_get_certificate(const SSL *s)
	{
	if (s->server)
		return(ssl_get_server_send_cert(s));
	else if (s->cert != NULL)
	if (s->cert != NULL)
		return(s->cert->key->x509);
	else
		return(NULL);