]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
tcptls: Print notice when TLS is enabled but not configured.
authorAlexander Traud <pabstraud@compuserve.com>
Mon, 6 Nov 2017 09:18:24 +0000 (10:18 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Mon, 6 Nov 2017 09:28:13 +0000 (04:28 -0500)
Asterisk can be compiled without a SSL/TLS library, without the Development
Headers of OpenSSL. However, if TLS (SIP) or Secure-WebSockets (WebRTC) was
enabled in a configuration file, Asterisk did not notice the user. Asterisk
failed silently, only the corresponding TCP ports were not open.

ASTERISK-27394
Reported-by: mossley74
Change-Id: Ib8b7539a5b2af8154c22e5f7a40fc68f95d95b93

main/tcptls.c

index 144b32f47012b93d29923023f4b3414fa8a4e1fb..ef22094bf6f78231e4c232fef6fb1872f7b34cd3 100644 (file)
@@ -874,7 +874,10 @@ void *ast_tcptls_server_root(void *data)
 static int __ssl_setup(struct ast_tls_config *cfg, int client)
 {
 #ifndef DO_SSL
-       cfg->enabled = 0;
+       if (cfg->enabled) {
+               ast_log(LOG_NOTICE, "Configured without OpenSSL Development Headers");
+               cfg->enabled = 0;
+       }
        return 0;
 #else
        int disable_ssl = 0;