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:
parent
daea0ff8a9
commit
34d69d3b23
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue