@oej commented on this pull request.
+int to_ssl(SSL_CTX** tls_ctx_p, SSL** tls_conn_p, int tcp_sock, int method)
+{ + *tls_ctx_p = init_ssl_ctx(method); + if (!(*tls_ctx_p)) { + LM_ERR("to_ssl(): Error on initialising ssl context\n"); + return -1; + } + if (certificate.s && private_key.s) { + if (load_certificates(*tls_ctx_p, &certificate, &private_key) < 0) { + LM_ERR("to_ssl(): Error on loading certificates\n"); + return -1; + } + } + *tls_conn_p = init_ssl_conn(tcp_sock, *tls_ctx_p); + if (!(*tls_conn_p)) { + LM_ERR("to_ssl(): Error on negociating ssl connection\n");
TLS connection