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

Jenkins2 asteriskteam at digium.com
Tue Nov 7 09:45:23 CST 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7000 )

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(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/tcptls.c b/main/tcptls.c
index 4a95f72..a6d0538 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -316,7 +316,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/7000
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8b7539a5b2af8154c22e5f7a40fc68f95d95b93
Gerrit-Change-Number: 7000
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171107/4af52b22/attachment-0001.html>


More information about the asterisk-code-review mailing list