/* * called from main.c when opensips exits (main process) */ void destroy_tls(void) { struct tls_domain *d; LM_DBG("entered\n"); d = tls_server_domains; while (d) { if (d->ctx) SSL_CTX_free(d->ctx); d = d->next; } d = tls_client_domains; while (d) { if (d->ctx) SSL_CTX_free(d->ctx); d = d->next; } if (tls_default_server_domain && tls_default_server_domain->ctx) { SSL_CTX_free(tls_default_server_domain->ctx); } if (tls_default_client_domain && tls_default_client_domain->ctx) { SSL_CTX_free(tls_default_client_domain->ctx); } tls_free_domains(); /* TODO - destroy static locks */ /* library destroy */ ERR_free_strings(); /*SSL_free_comp_methods(); - this function is not on std. openssl*/ EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); }
/* * called from main.c when ser exits (main process) */ void destroy_tls(void) { struct tls_domain *d; DBG("destroy_tls: Entered\n"); d = tls_domains; while (d) { if (d->ctx) SSL_CTX_free(d->ctx); d = d->next; } if (default_ctx) SSL_CTX_free(default_ctx); tls_free_domains(); }