Module: kamailio
Branch: master
Commit: 8f34083999a379db0c5c24b6e2739f9a413ea86b
URL:
https://github.com/kamailio/kamailio/commit/8f34083999a379db0c5c24b6e2739f9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-07-22T09:22:42+02:00
ruxc: added http_tlsmode parameter
- if set to 1, it connects only to trusted https websites
- default 0 - accept all certificates
---
Modified: src/modules/ruxc/ruxc_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8f34083999a379db0c5c24b6e2739f9…
Patch:
https://github.com/kamailio/kamailio/commit/8f34083999a379db0c5c24b6e2739f9…
---
diff --git a/src/modules/ruxc/ruxc_mod.c b/src/modules/ruxc/ruxc_mod.c
index 2d100d373c..2cd1cd27d0 100644
--- a/src/modules/ruxc/ruxc_mod.c
+++ b/src/modules/ruxc/ruxc_mod.c
@@ -39,6 +39,7 @@
MODULE_VERSION
static int _ruxc_http_timeout = 5000;
+static int _ruxc_http_tlsmode = 0;
static int mod_init(void);
static int child_init(int);
@@ -71,6 +72,7 @@ static cmd_export_t cmds[]={
static param_export_t params[]={
{"http_timeout", PARAM_INT, &_ruxc_http_timeout},
+ {"http_tlsmode", PARAM_INT, &_ruxc_http_tlsmode},
{0, 0, 0}
};
@@ -129,6 +131,7 @@ static int ki_ruxc_http_get_helper(sip_msg_t *_msg, str *url, str
*hdrs,
v_http_request.timeout_connect = _ruxc_http_timeout;
v_http_request.timeout_read = _ruxc_http_timeout;
v_http_request.timeout_write = _ruxc_http_timeout;
+ v_http_request.tlsmode = _ruxc_http_tlsmode;
v_http_request.url = url->s;
v_http_request.url_len = url->len;
@@ -225,6 +228,7 @@ static int ki_ruxc_http_post_helper(sip_msg_t *_msg, str *url, str
*body, str *h
v_http_request.timeout_connect = _ruxc_http_timeout;
v_http_request.timeout_read = _ruxc_http_timeout;
v_http_request.timeout_write = _ruxc_http_timeout;
+ v_http_request.tlsmode = _ruxc_http_tlsmode;
v_http_request.url = url->s;
v_http_request.url_len = url->len;