[Asterisk-code-review] tcptls: Print notice when TLS is enabled but not configured. (asterisk[13])

Alexander Traud asteriskteam at digium.com
Mon Nov 6 03:28:14 CST 2017


Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/6999


Change subject: tcptls: Print notice when TLS is enabled but not configured.
......................................................................

tcptls: Print notice when TLS is enabled but not configured.

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
---
M main/tcptls.c
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/99/6999/1

diff --git a/main/tcptls.c b/main/tcptls.c
index 144b32f..ef22094 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -874,7 +874,10 @@
 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;

-- 
To view, visit https://gerrit.asterisk.org/6999
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8b7539a5b2af8154c22e5f7a40fc68f95d95b93
Gerrit-Change-Number: 6999
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171106/03003155/attachment.html>


More information about the asterisk-code-review mailing list