From f751dc47596050694c19feba162e63f610e29a74 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 11 Feb 2013 18:24:03 +0000 Subject: [PATCH] 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. (cherry picked from commit 147dbb2fe3bead7a10e2f280261b661ce7af7adc) --- ssl/ssl_lib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 8b6b601cab..4714d89a4c 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -2428,9 +2428,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); -- 2.34.1