Fix warning and make no-tlsext work.

This commit is contained in:
Dr. Stephen Henson
2007-08-12 18:56:14 +00:00
parent 3444961787
commit 367eb1f125
6 changed files with 108 additions and 101 deletions

View File

@@ -2573,8 +2573,10 @@ SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx)
{
if (ssl->ctx == ctx)
return ssl->ctx;
#ifndef OPENSSL_NO_TLSEXT
if (ctx == NULL)
ctx = ssl->initial_ctx;
#endif
if (ssl->cert != NULL)
ssl_cert_free(ssl->cert);
ssl->cert = ssl_cert_dup(ctx->cert);