diff options
author | Bodo Möller <bodo@openssl.org> | 2006-01-06 09:08:59 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2006-01-06 09:08:59 +0000 |
commit | 1aeb3da83f267bc5e7cb9e7bd72dc0e07a751ba3 (patch) | |
tree | 439399808bd9feddefd89a6524b0547b79f8031a /ssl/ssl_lib.c | |
parent | e8e5b46e2b92b234791b8be3331cdc0f187d4bbe (diff) |
Fixes for TLS server_name extension
Submitted by: Peter Sylvester
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r-- | ssl/ssl_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 841d75d585..42aa874542 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -307,6 +307,10 @@ SSL *SSL_new(SSL_CTX *ctx) CRYPTO_add(&ctx->references,1,CRYPTO_LOCK_SSL_CTX); s->ctx=ctx; +#ifndef OPENSSL_NO_TLSEXT + CRYPTO_add(&ctx->references,1,CRYPTO_LOCK_SSL_CTX); + s->initial_ctx=ctx; +#endif s->verify_result=X509_V_OK; @@ -493,6 +497,9 @@ void SSL_free(SSL *s) /* Free up if allocated */ if (s->ctx) SSL_CTX_free(s->ctx); +#ifndef OPENSSL_NO_TLSEXT + if (s->initial_ctx) SSL_CTX_free(s->initial_ctx); +#endif if (s->client_CA != NULL) sk_X509_NAME_pop_free(s->client_CA,X509_NAME_free); |