SSL_new() may potentially add a certfificate. Therefore, wen

duplicating the certificate that is in the original SSL, remove the
one that SSL_new() provided, if any.
Spotted by: Mike Zeoli <zeoli@roguewave.com>
This commit is contained in:
Richard Levitte 2000-12-12 08:08:53 +00:00
parent daea0ff8a9
commit 34d69d3b23

View file

@ -1718,6 +1718,10 @@ SSL *SSL_dup(SSL *s)
if (s->cert != NULL)
{
if (ret->cert != NULL)
{
ssl_cert_free(ret->cert);
}
ret->cert = ssl_cert_dup(s->cert);
if (ret->cert == NULL)
goto err;