summaryrefslogtreecommitdiff
path: root/res/res_pjsip
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2016-05-07 13:39:25 -0600
committerJoshua Colp <jcolp@digium.com>2016-05-09 11:29:13 -0500
commitfb6227a37289e51931574ba33dd836e10ea5e5c7 (patch)
treefd774cf3f8603427856457b71209dfa2379cb58e /res/res_pjsip
parentdd00c71aae12ddfb8af9ca5fab41b1badd50ca5a (diff)
config_transport: Tell pjproject to allow all SSL/TLS protocols
The default tls settings for pjproject only allow TLS 1, TLS 1.1 and TLS 1.2. SSL is not allowed. So, even if you specify "sslv3" for a transport method, it's silently ignored and one of the TLS protocols is used. This was a new behavior of pjsip_tls_setting_default() in 2.4 (when tls.proto was added) that we never caught. Now we need to set tls.proto = 0 after we call pjsip_tls_setting_default(). This tells pjproject to set the socket protocol to match the method. ASTERISK-26004 #close Change-Id: Icfb55c1ebe921298dedb4b1a1d3bdc3ca41dd078
Diffstat (limited to 'res/res_pjsip')
-rw-r--r--res/res_pjsip/config_transport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index d2c087487..3a5afb6bc 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -378,6 +378,10 @@ static struct ast_sip_transport_state *find_or_create_temporary_state(struct ast
new_state->type = transport->type;
pjsip_tls_setting_default(&new_state->tls);
+#ifdef HAVE_PJSIP_TLS_TRANSPORT_PROTO
+ /* proto must be forced to 0 to enable all protocols otherwise only TLS will work */
+ new_state->tls.proto = 0;
+#endif
new_state->tls.ciphers = new_state->ciphers;
ao2_ref(new_state, +1);