[Freeswitch-branches] [commit] r6639 - freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN stkn at freeswitch.org
Tue Dec 11 08:07:54 EST 2007


Author: stkn
Date: Tue Dec 11 08:07:52 2007
New Revision: 6639

Modified:
   freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
   freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/sofia.c

Log:
Location of certificate files can be specified now, defaults to $prefix/conf/ssl

Modified: freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	(original)
+++ freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	Tue Dec 11 08:07:52 2007
@@ -226,6 +226,7 @@
 	char *hold_music;
 	char *bind_params;
 	char *tls_bind_params;
+	char *tls_cert_dir;
 	char *reg_domain;
 	char *user_agent;
 	int sip_port;

Modified: freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/branches/stkn/sofia-exp/trunk/src/mod/endpoints/mod_sofia/sofia.c	Tue Dec 11 08:07:52 2007
@@ -351,11 +351,13 @@
 	}
 
 	profile->nua = nua_create(profile->s_root,	/* Event loop */
-							  sofia_event_callback,	/* Callback for processing events */
-							  profile,	/* Additional data to pass to callback */
-							  NUTAG_URL(profile->bindurl),
-							  TAG_IF(profile->pflags & PFLAG_TLS, NUTAG_SIPS_URL(profile->tls_bindurl)),
-							  NTATAG_UDP_MTU(65536), TAG_END());	/* Last tag should always finish the sequence */
+							sofia_event_callback,	/* Callback for processing events */
+							profile,	/* Additional data to pass to callback */
+							NUTAG_URL(profile->bindurl),
+							TAG_IF(profile->pflags & PFLAG_TLS, NUTAG_SIPS_URL(profile->tls_bindurl)),
+							TAG_IF(profile->pflags & PFLAG_TLS, NUTAG_CERTIFICATE_DIR(profile->tls_cert_dir)),
+							NTATAG_UDP_MTU(65536),
+							TAG_END());	/* Last tag should always finish the sequence */
 
 	if (!profile->nua) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Creating SIP UA for profile: %s\n", profile->name);
@@ -992,7 +994,9 @@
 						profile->tls_bind_params = switch_core_strdup(profile->pool, val);
 					} else if (!strcasecmp(var, "tls-sip-port")) {
 						profile->tls_sip_port = atoi(val);
-					}
+					} else if (!strcasecmp(var, "tls-cert-dir")) {
+						profile->tls_cert_dir = switch_core_strdup(profile->pool, val);
+ 					}
 				}
 
 				if (!profile->cng_pt) {
@@ -1067,6 +1071,10 @@
 						char *url = profile->tls_bindurl;
 						profile->tls_bindurl = switch_core_sprintf(profile->pool, "%s;%s", url, profile->tls_bind_params);
 					}
+
+					if (!profile->tls_cert_dir) {
+						profile->tls_cert_dir = switch_core_sprintf(profile->pool, "%s/ssl", SWITCH_GLOBAL_dirs.conf_dir);
+					}
 				}
 			}
 			if (profile) {



More information about the Freeswitch-branches mailing list