rely on talloc for certs, too
authorAlan T. DeKok <aland@freeradius.org>
Fri, 3 Mar 2017 14:22:10 +0000 (09:22 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 3 Mar 2017 14:22:10 +0000 (09:22 -0500)
src/main/tls.c

index 93ba27f..caa7e62 100644 (file)
@@ -2436,26 +2436,6 @@ static int set_ecdh_curve(SSL_CTX *ctx, char const *ecdh_curve, bool disable_sin
 #endif
 #endif
 
-/*
- * DIE OPENSSL DIE DIE DIE
- *
- * What a palaver, just to free some data attached the
- * session. We need to do this because the "remove" callback
- * is called when refcount > 0 sometimes, if another thread
- * is using the session
- */
-static void sess_free_certs(UNUSED void *parent, void *data_ptr,
-                               UNUSED CRYPTO_EX_DATA *ad, UNUSED int idx,
-                               UNUSED long argl, UNUSED void *argp)
-{
-       VALUE_PAIR **certs = data_ptr;
-       if (!certs) return;
-
-       DEBUG2(LOG_PREFIX ": Freeing cached session Certificates");
-
-       fr_pair_list_free(certs);
-}
-
 /** Add all the default ciphers and message digests reate our context.
  *
  * This should be called exactly once from main, before reading the main config
@@ -2471,7 +2451,7 @@ void tls_global_init(void)
        /*
         *      Initialize the index for the certificates.
         */
-       fr_tls_ex_index_certs = SSL_SESSION_get_ex_new_index(0, NULL, NULL, NULL, sess_free_certs);
+       fr_tls_ex_index_certs = SSL_SESSION_get_ex_new_index(0, NULL, NULL, NULL, NULL);
 }
 
 #ifdef ENABLE_OPENSSL_VERSION_CHECK