summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsip/sip_config.h
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2014-02-27 06:16:36 +0000
committerNanang Izzuddin <nanang@teluu.com>2014-02-27 06:16:36 +0000
commitebb1c27f05074e4b4a82d7e50c93dca7ce096c70 (patch)
tree75b0f1bcb1d74116cddd3bfb0f5da0a43b921c25 /pjsip/include/pjsip/sip_config.h
parentfd3ba06377be97f6d36447783b2f065103351216 (diff)
Fixed #1740: TLS will be used whenever request URI uses "sips" scheme regardless the target-URI scheme/transport. This behavior is configurable via 'PJSIP_DONT_SWITCH_TO_TLS' in compile-time, or 'pjsip_cfg()->disable_tls_switch' in run-time.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4770 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip/sip_config.h')
-rw-r--r--pjsip/include/pjsip/sip_config.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h
index 95f75383..fc7604cb 100644
--- a/pjsip/include/pjsip/sip_config.h
+++ b/pjsip/include/pjsip/sip_config.h
@@ -112,6 +112,15 @@ typedef struct pjsip_cfg_t
pj_bool_t disable_tcp_switch;
/**
+ * Disable automatic switching to TLS if target-URI does not use
+ * "sips" scheme nor TLS transport, even when request-URI uses
+ * "sips" scheme.
+ *
+ * Default is PJSIP_DONT_SWITCH_TO_TLS.
+ */
+ pj_bool_t disable_tls_switch;
+
+ /**
* Enable call media session to always be updated to the latest
* received early media SDP when receiving forked early media
* (multiple 183 responses with different To tag).
@@ -309,6 +318,24 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void)
/**
+ * As specified RFC 3261 section 8.1.2, when request-URI uses "sips" scheme,
+ * TLS must always be used regardless of the target-URI scheme or transport
+ * type.
+ *
+ * This option will specify whether the behavior of automatic switching to TLS
+ * should be disabled, i.e: regard the target-URI scheme or transport type.
+ *
+ * This option can also be controlled at run-time by the \a disable_tls_switch
+ * setting in pjsip_cfg_t.
+ *
+ * Default is 0 (no).
+ */
+#ifndef PJSIP_DONT_SWITCH_TO_TLS
+# define PJSIP_DONT_SWITCH_TO_TLS 0
+#endif
+
+
+/**
* Specify whether the call media session should be updated to the latest
* received early media SDP when receiving forked early media (multiple 183
* responses with different To tag).