From 9b11dbe4b9f7c96fe0b8e6cc4af096cfdaecb79b Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 6 Mar 2013 12:58:22 -0600 Subject: [PATCH] FS-4452 --resolve --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index e6a01c6b43..0114190bd8 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Fri Mar 1 15:47:13 CST 2013 +Wed Mar 6 12:57:17 CST 2013 diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c index 2facb30d0d..828b3f313c 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c @@ -303,6 +303,7 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti) meth = SSLv23_method(); tls->ctx = SSL_CTX_new((SSL_METHOD*)meth); + SSL_CTX_sess_set_remove_cb(tls->ctx, NULL); } if (tls->ctx == NULL) { @@ -399,14 +400,14 @@ void tls_free(tls_t *tls) if (!tls) return; - if (tls->con != NULL) - SSL_shutdown(tls->con); + if (tls->con != NULL) { + SSL_shutdown(tls->con); + SSL_free(tls->con), tls->con = NULL; + } - if (tls->ctx != NULL && tls->type != tls_slave) + if (tls->ctx != NULL && tls->type != tls_slave) { SSL_CTX_free(tls->ctx); - - if (tls->bio_con != NULL) - BIO_free(tls->bio_con); + } su_home_unref(tls->home); } @@ -475,7 +476,6 @@ tls_t *tls_init_secondary(tls_t *master, int sock, int accept) if (tls) { tls->ctx = master->ctx; - tls->type = master->type; tls->accept = accept ? 1 : 0; tls->verify_outgoing = master->verify_outgoing; tls->verify_incoming = master->verify_incoming;