Commit Graph
82 Commits
Author SHA1 Message Date
Anthony Minessale 21c113ba2c [mod_curl] look for cacert in certs dir 2021-05-11 01:23:20 +03:00
Aron Podrigal 954056c009 [mod_curl] Added PATCH method, add insecure and secure options to verify SSL certs, add proxy option.
* mod_curl: hanlde PATCH method

* mod_curl: verify ssl with an option `insecure` to not verify

* mod_curl: added option to use proxy

* mod_curl: use assert(options)

* [mod_curl] default certificate validation secure/insecure controlled by `validate-certs` config option.

* [mod_curl] Added option secure to force https certs validation
2021-05-10 22:32:48 +03:00
Andrey Volk 3e7ba04cbe [mod_curl] Avoid passing null pointer value via data parameter of do_lookup_url() 2021-03-17 18:55:40 +03:00
Andrey Volk 0275ea1eb4 [Build-System] Use $(DefaultPlatformToolset) so it's easier to build using newer Microsoft Visual Studio versions. 2020-05-25 14:18:25 +04:00
Christian Schmidt 65e20af347 FS-11520: [mod_curl] Make max_bytes configurable 2018-11-21 22:21:33 +01:00
Andrey Volk 671da28796 FS-11263: [Build-System] Move FreeSWITCH build system to Visual Studio 2017 on Windows. 2018-07-24 07:21:55 +00:00
Andrey Volk c9ac9c66e3 FS-11090: [Build-System] Move PCRE library to pre-compiled binaries, minor cleanup, reduce build log verbosity on windows. 2018-07-24 07:21:49 +00:00
Andrey Volk c31e7062b7 FS-11085: [Build-System] Update curl to 7.59.0 and move to pre-compiled binaries on Windows. 2018-07-24 07:21:46 +00:00
Andrey Volk ea8c3be8ec FS-10541: [Build-System] Move OpenSSL to props with BaseDir on windows. 2017-10-07 22:50:48 +03:00
Seven Du 7f1813cf4f FS-10552 Doh, remove extra debug lines 2017-07-28 10:18:38 +08:00
Seven Du deb1bd5cdf FS-10552 #resolve 2017-07-28 10:11:06 +08:00
Andrey Volk bf101a5f0b FS-10525: [Build-System] Update curl to 7.54.1 for windows, move to props. 2017-07-21 01:21:34 +03:00
Sergey Safarov df1ab07ca4 FS-9924: Removed extra space in source files 2017-02-09 23:59:49 -05:00
Anthony Minessale f8b19b7485 FS-8190 #resolve [When using nixevent, freeswitch stops sending us certain custom event that were NOT part of the nixevent command] 2015-09-21 18:00:32 -05:00
Michael Jerris 164c6111a1 FS-7966: remove some older versions of msvc build system as these will no longer work soon, please use 2015 instead 2015-08-31 10:19:10 -05:00
Michael Giagnocavo 5e456fe9a6 FS-7966. First pass at moving to Visual Studio 2015.
The new C compiler breaks a lot of things. snprintf and timespec now exist, and redefining causes an error.
Many more things are warnings, so warnings-as-errors will fail - remove it from some projects for now.
V8: don't pass VS version to build batch file.
mod_sofia: Config has too-long if/elseif chain. Break this up to avoid "parser stack overflow; program too complex".
Add mod_conference.h to project and dir to includes.
2015-08-21 18:28:32 -04:00
Yossi Neiman 8ca2cfa574 FS-7429: fix to output proper json 2015-06-30 12:45:01 -05:00
Michael Giagnocavo f116387443 FS-7644. Change 2013.vcxproj references to 2013 2015-06-18 04:17:53 -06:00
Jeff Lenk 345e50d25a FS-7644 2015-06-11 15:29:28 -05:00
Michael Jerris 2cc0348422 FS-7635: remove msvc 2005 2008 and 2010 non working build systems. There are now multiple more recent (3 different ones) and some free versions of the compiler that can be used. 2015-06-10 16:33:14 -04:00
Michael Jerris 3a70750b42 FS-7340: remove all build system references to json-c because we are no longer using it anywhere 2015-03-04 14:06:18 -05:00
Yossi Neiman 5303101df0 FS-7340: Converting the json handling to use the types and functions in switch_json.h .
FS-7340:  mod_curl: Missed a free.

FS-7340:  mod_curl:  Saved a few lines of code, added a check for successful allocation of cJSON structures.
2015-03-04 12:24:04 -06:00
Michael Jerris 250234da76 FS-5800: [mod_curl] add support for additional curl auth methods 2014-11-17 11:01:35 -05:00
Travis Cross f1df8d6096 Allow setting CURL timeout from curl API command
Previously the `timeout` option to the curl API command set only
`CURLOPT_CONNECTTIMEOUT` -- the maximum amount of time that curl will
wait to connect to the server.  If the server accepted the connection
but then never replied, curl would wait essentially forever.  There
was no way to set `CURLOPT_TIMEOUT` -- the maximum amount of time the
entire request operation is allowed to take.

With this change, the `timeout` option sets `CURLOPT_TIMEOUT`.  We've
earlier added a `connect-timeout` option to set
`CURLOPT_CONNECTTIMEOUT`.

This is a change to existing behavior.  However, it's likely that this
is what people expected it to do all along.  The curl application
call, for example, accepts both `curl_connect_timeout` and
`curl_timeout` channel variables, with the latter setting
`CURLOPT_TIMEOUT`.

If people really were relying on this odd behavior, we'll rename the
option with the new behavior to something else and come up with a
transition plan.
2014-11-16 19:31:00 +00:00
Travis Cross 1ee325df48 Add connect-timeout option for curl API command
This option sets the maximum number of seconds that curl will wait to
connect with the server.

Right now this is a synonym for the `timeout` option.
2014-11-16 19:31:00 +00:00
Travis Cross b2f59dd200 Add warning when using HTTPS with mod_curl
mod_curl currently does not verify the authenticity of the peer's
certificate, and does not verify whether the common name on the
certificate matches the server.  This makes mod_curl initiated TLS
connections completely insecure.  We should fix this, but until we do,
we'll warn people that it's not doing what they may think it is.

ref: http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html
ref: http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html
2014-08-21 22:24:04 +00:00
Travis Cross f2ca3c5211 Decode params to curl_sendfile
`curl_sendfile` generates a multipart message with Content-Type:
multipart/form-data with no separate Content-Type headers in the parts
for each non-file argument.  These parts therefore default to
text/plain.  However, prior to this commit, we were putting the URL
encoded POST data into these parts, which is not correct.  We should
be putting raw text into the parts.

With this commit, we urldecode each argument key and value before
composing the multipart message.

See:

  http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2
2014-08-20 10:37:24 +00:00
Travis Cross 5a7144c44a Add DELETE request support to mod_curl 2014-07-31 04:07:36 +00:00
Travis Cross c17d58b856 Refactor the curl PUT read callback 2014-07-04 07:47:04 +00:00
Travis Cross 2fea35282f Advance the data_stream data pointer 2014-07-04 07:43:59 +00:00
Travis Cross a84b76be2a Add PUT support to mod_curl curl api and app
With both the `curl` api command and application, you can now ask for
data to be PUT where previously it could only be sent via POST.
2014-07-04 07:40:13 +00:00
Michael Jerris 529099f15c silence incorrect warnings about null pointer derference and remove unused code 2014-04-29 14:34:49 -04:00
Jeff Lenk dd242f3ba6 FS-6346 2014-03-20 18:32:19 -05:00
Travis Cross 1470622292 Require libcurl as a system dependency
This purges libcurl from our tree and requires it to be present on the
system for building and running FreeSWITCH.

FS-353
2014-03-20 21:15:29 +00:00
Travis Cross c993962d0b Update some modules to use CPPFLAGS
These modules use curl and we'll be adding in some bits to the
CPPFLAGS.
2014-03-20 21:09:46 +00:00
Travis Cross e6ec9b3c61 Add automake subdir-options for modules
The automake project is apparently changing behavior in their next
major version and warning everyone who relies on subdir-options to add
it explicitly.
2014-03-08 00:32:02 +00:00
Michael Jerris bcd9f49fbe move applications to use automake 2014-03-07 18:36:12 -05:00
Anthony Minessale 6ef3f7bde7 add timeout <seconds> to mod_curl api call 2014-03-03 22:58:45 +05:00
Ken Rice 6e7d5d0897 update copyright header for 2014 2014-02-12 12:08:56 -06:00
Peter Olsson 93696934b2 Silence more compiler warnings 2014-01-23 12:25:15 +01:00
Seven Du 92d945e893 add back the log line deleted by accident 2013-07-30 22:12:58 +08:00
Seven Du b5e1725d52 remove debug 2013-07-30 18:02:42 +08:00
Seven Du d8a02dc244 add timeout options to mod_curl 2013-07-30 16:36:00 +08:00
Nathan Neulinger 32adc789f6 make noexpandtab explicit in all vim modelines other than xml files 2013-06-25 11:50:17 -05:00
Jeff Lenk a7577d7ee1 FS-5048 trivial build for windows 2013-02-28 14:30:56 -06:00
Raymond Chandler 04a2a88c98 FS-5048 --resolve refactored patch applied with author header 2013-02-28 14:32:50 -05:00
William King 14ce24950e FS-4714: remove the DEBUG to DEBUG1 change 2013-02-25 17:45:10 -08:00
Raymond Chandler 660fd495fc 4714 --resolve add decode 2013-02-15 14:47:49 -05:00
Raymond Chandler cd7d1efc2a FS-4714 --resolve patch applied 2013-02-13 15:08:19 -05:00
Jeff Lenk dc2c11f13f FS-4768 initial add of vs2012 build support 2012-12-29 14:57:15 -06:00