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)
This commit is contained in:
parent
fbe621d08f
commit
f751dc4759
@ -2428,9 +2428,7 @@ void ssl_clear_cipher_ctx(SSL *s)
|
|||||||
/* Fix this function so that it takes an optional type parameter */
|
/* Fix this function so that it takes an optional type parameter */
|
||||||
X509 *SSL_get_certificate(const SSL *s)
|
X509 *SSL_get_certificate(const SSL *s)
|
||||||
{
|
{
|
||||||
if (s->server)
|
if (s->cert != NULL)
|
||||||
return(ssl_get_server_send_cert(s));
|
|
||||||
else if (s->cert != NULL)
|
|
||||||
return(s->cert->key->x509);
|
return(s->cert->key->x509);
|
||||||
else
|
else
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user