<!-- either an absolute path, a relative path assuming ${prefix}/logs or a blank or omitted value will default to ${prefix}/logs/xml_cdr -->\r
<!-- <param name="err-log-dir" value="/tmp"/> -->\r
\r
+ <!-- optional: if enabled this will disable CA root certificate checks by libcurl -->\r
+ <!-- note: default value is disabled. only enable if you want this! -->\r
+ <!-- <param name="ignore-cacert-check" value="true" /> -->\r
+\r
</settings>\r
</configuration>\r
uint32_t delay;
uint32_t retries;
uint32_t shutdown;
+ int ignore_cacert_check;
} globals;
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load);
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "freeswitch-xml/1.0");
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, httpCallBack);
+ if (globals.ignore_cacert_check) {
+ curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);
+ }
+
/* these were used for testing, optionally they may be enabled if someone desires
curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, 120); // tcp timeout
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1); // 302 recursion level
globals.err_log_dir = switch_mprintf("%s/%s", SWITCH_GLOBAL_dirs.log_dir, val);
}
}
+ } else if (!strcasecmp(var, "ignore-cacert-check") && switch_true(val)) {
+ globals.ignore_cacert_check = 1;
}
if (switch_strlen_zero(globals.err_log_dir)) {