diff --git a/conf/sip_profiles/external.xml b/conf/sip_profiles/external.xml index 4cd2836556..a709cbb94c 100644 --- a/conf/sip_profiles/external.xml +++ b/conf/sip_profiles/external.xml @@ -79,8 +79,8 @@ - - + + diff --git a/conf/sip_profiles/internal.xml b/conf/sip_profiles/internal.xml index 49bfcc960a..daec3643c5 100644 --- a/conf/sip_profiles/internal.xml +++ b/conf/sip_profiles/internal.xml @@ -187,7 +187,7 @@ - + diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h index f148d99fdd..db5265b338 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.h +++ b/src/mod/endpoints/mod_sofia/mod_sofia.h @@ -641,7 +641,7 @@ struct sofia_profile { uint32_t queued_events; uint32_t cseq_base; int tls_only; - int tls_no_verify_date; + int tls_verify_date; enum tport_tls_verify_policy tls_verify_policy; int tls_verify_depth; char *tls_passphrase; diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index c02c4789e4..3628c7bcf8 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1882,7 +1882,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void TAG_IF(sofia_test_pflag(profile, PFLAG_TLS), TPTAG_TLS_VERIFY_DEPTH(profile->tls_verify_depth)), TAG_IF(sofia_test_pflag(profile, PFLAG_TLS), - TPTAG_TLS_VERIFY_DATE(! profile->tls_no_verify_date)), + TPTAG_TLS_VERIFY_DATE(profile->tls_verify_date)), TAG_IF(sofia_test_pflag(profile, PFLAG_TLS) && profile->tls_verify_in_subjects, TPTAG_TLS_VERIFY_SUBJECTS(profile->tls_verify_in_subjects)), TAG_IF(sofia_test_pflag(profile, PFLAG_TLS), @@ -3478,9 +3478,6 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile) } } } - profile->tls_verify_policy = TPTLS_VERIFY_NONE; - /* lib default */ - profile->tls_verify_depth = 2; switch_event_destroy(&xml_params); } @@ -3687,6 +3684,11 @@ switch_status_t config_sofia(int reload, char *profile_name) profile->ndlb |= PFLAG_NDLB_ALLOW_NONDUP_SDP; profile->te = 101; + profile->tls_verify_policy = TPTLS_VERIFY_NONE; + /* lib default */ + profile->tls_verify_depth = 2; + profile->tls_verify_date = SWITCH_TRUE; + for (param = switch_xml_child(settings, "param"); param; param = param->next) { char *var = (char *) switch_xml_attr_soft(param, "name"); char *val = (char *) switch_xml_attr_soft(param, "value"); @@ -4422,8 +4424,8 @@ switch_status_t config_sofia(int reload, char *profile_name) profile->tls_bind_params = switch_core_strdup(profile->pool, val); } else if (!strcasecmp(var, "tls-only")) { profile->tls_only = switch_true(val); - } else if (!strcasecmp(var, "tls-no-verify-date")) { - profile->tls_no_verify_date = switch_true(val); + } else if (!strcasecmp(var, "tls-verify-date")) { + profile->tls_verify_date = switch_true(val); } else if (!strcasecmp(var, "tls-verify-depth")) { profile->tls_verify_depth = atoi(val); } else if (!strcasecmp(var, "tls-verify-policy")) {