diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-02-11 18:24:03 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-02-11 18:26:33 +0000 |
commit | 243dac0af0f7d8dec181ba0db6b32c8fbc6fbc31 (patch) | |
tree | 494a1570f10607c559fd9c26c31cbc8685bc6d76 /ssl | |
parent | da018b129efbfffed766cfdea239c2a6304e9cf9 (diff) |
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)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_lib.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 25573e43e2..b3c21ea068 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -2601,9 +2601,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); |