208 Commits

Author SHA1 Message Date
Anthony Minessale
cd5182c27c FS-10150: [freeswitch-core] Reduce writes to closed ssl sockets #resolve 2017-03-17 13:47:35 -05:00
Mike Jerris
a3ee7595bb FS-10025: fix global symbol scope issue causing modules to use another modules global pointer 2017-02-09 17:23:30 -06:00
Sebastian Kemper
1568194ce5 FS-9840 sofia-sip: fix implicit declaration warning
This fixes the following compile-time warning:

cc1: note: someone does not honour COPTS correctly, passed 2 times
	 LTCOMPILE tport_type_connect.lo
cc1: note: someone does not honour COPTS correctly, passed 2 times
	 LTCOMPILE tport_type_ws.lo
cc1: note: someone does not honour COPTS correctly, passed 2 times
	 LTCOMPILE ws.lo
cc1: note: someone does not honour COPTS correctly, passed 2 times
ws.c: In function 'hton64':
ws.c:730:14: error: implicit declaration of function '__bswap_64' [-Werror=implicit-function-declaration]
  else return __bswap_64(val);
              ^
cc1: all warnings being treated as errors
Makefile:1465: recipe for target 'ws.lo' failed
make[12]: *** [ws.lo] Error 1

Fix by including byteswap.h, which is available on Linux and also
everywhere glibc is used (wpa_supplicant includes this header the same
way).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2016-12-23 21:44:27 +01:00
Seven Du
b26fa6e17c FS-9810 fix ws write fail on slow network 2016-12-04 12:49:46 +08:00
William King
15a7156230 FS-9656 Coverity 1364971: resolve memory leak in new HEPv3 logging 2016-10-21 11:35:58 -05:00
Mike Jerris
f35c2a4ec2 FS-9623: fix rare crash on startup due to openssl init functions being run multiple times 2016-10-07 15:33:50 -04:00
Anthony Minessale
5c43a17a04 FS-8761 2016-09-12 11:24:41 -05:00
Sebastian Denz
ebaf95e709 FS-9452: fixed true/false logic for using dst flag 2016-08-22 16:36:37 +02:00
Anthony Minessale
8abc16f501 FS-8761 2016-08-08 16:39:44 -05:00
Anthony Minessale
1e7b4a1301 FS-8761 #resolve [Memory leak in FreeSWITCH] 2016-08-06 11:49:21 -05:00
Anthony Minessale
61c487c3e8 Revert "FS-8761 #resolve [Memory leak in FreeSWITCH]"
This reverts commit 341e94b28d966ae47390606c5447bb56f2453465.
2016-08-06 11:47:07 -05:00
Anthony Minessale
341e94b28d FS-8761 #resolve [Memory leak in FreeSWITCH] 2016-08-03 23:57:00 -05:00
Alexandr Dubovikov
c6fa70054d FS-9227: [sofia-sip] fix Wrong byte order in HEP packet for source and destination ports 2016-06-07 12:30:58 -05:00
Mike Jerris
e6d77e2813 Merge pull request #830 in FS/freeswitch from ~ETHANATKINS/freeswitch:ssl-transport to master
* commit 'db0dfe94d079e8b82c5ca93092faa2fe204b0d06':
  FS-9113 [sofia-sip] Clear out ssl error queue
2016-05-23 10:52:12 -05:00
Spencer Thomason
7f24fc7ab5 FS-9158 [sofia-sip] Add include for changes in 65460fa 2016-05-14 13:42:17 -07:00
Ethan Atkins
db0dfe94d0 FS-9113 [sofia-sip] Clear out ssl error queue
Sofia will unpredictably close a tls transport during call setup. This
occurs when the epoll event loop wakes up the socket reader and SSL_read
returns an error because there is no packet on the socket. Normally
sofia will read the last error using SSL_get_error and return
SSL_ERROR_WANT_READ. Sofia gracefully handles this error and the
transport stays open. Sometimes, however, the worker thread will call
SSL_shutdown for a different transport, which can write an error to the
internal openssl error queue. If that error is not read off the queue,
the next time that SSL_get_error is called, it will read that unrelated
error.

The documentation for SSL_shutdown explains that there are three
possible results -1, 0 and 1 with, oddly, 1 indicating success. The -1
result code occurs when there is no handshake callback registered on the
connection. It can return 0 when there is still work to be done. The
documentation suggest that it is insufficient to call it just once. This
is why I added the do {} while () construct.

Although just the fix to SSL_shutdown was enough to resolve my issue, I
a also audited other calls to SSL_* functions and found a few other
cases where an error may be generated, but was not handled.
2016-04-30 10:39:47 -07:00
Michael Jerris
65460fae25 FS-9099: fix windows build 2016-04-28 14:29:39 -05:00
Michael Jerris
0ba86871b4 FS-9078: [sofia-sip] fix typo in HEP3 2016-04-27 15:34:17 -05:00
Mike Jerris
943e8ef323 FS-9099: [sofia-sip] fix windows build of websocket transport 2016-04-27 16:08:13 -04:00
Michael Jerris
3caa794f7a FS-9078: [sofia-sip] fix linux build of HEPv2/HEPv3 code 2016-04-27 16:02:00 -04:00
Michael Jerris
c6d0a99495 FS-9078: [sofia-sip] fix linux build of HEPv2/HEPv3 code 2016-04-27 14:45:59 -05:00
Michael Jerris
6ce69adcb3 FS-9099: remove unneeded header include 2016-04-27 14:45:09 -05:00
Mike Jerris
e23bb54f9a FS-9078: [sofia-sip] fix windows build of HEPv2/HEPv3 code 2016-04-27 13:50:14 -04:00
Anthony Minessale
18db50c46a FS-9099 #resolve [Websocket raw frame read timeout is too short] 2016-04-25 17:29:50 -05:00
Alexandr Dubovikov
981b528c48 FS-9078 added hepv2 and hepv3 support 2016-04-18 19:28:00 +02: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
Michael Jerris
69ea6a444a FS-7587: keep sofia-sip ws lib in sync 2015-06-01 15:27:45 -04:00
Alexander Traud
022fddbe6a Add Perfect Forward Secrecy (DHE PFS) to mod_sofia
Ephemeral ECDH (ECDHE) was supported already. This patch adds Ephemeral
DH (DHE). To enable it, add DH parameters into the private-key file of
your server (agent.pem). For example via:
openssl dhparam -out dh.pem 2048

FS-7561 #resolve
2015-06-01 12:45:19 -05:00
Michael Jerris
d17edb59dc FS-7264: fix signed/unsigned warnings on windows building ws.c 2015-02-11 12:40:04 -05:00
Anthony Minessale
5187aaed79 FS-7117 #comment revert bf5210bf72d6c4b0d9b599a5a07ee59a9c947436 and implement it in ws.c please be sure to learn to use git commit hooks to properly associate commits with jiras 2015-01-07 17:17:28 -06:00
Anthony Minessale
6c1bc0e2f6 sync ws code 2015-01-07 02:12:29 -06:00
Anthony Minessale
0150c862a2 FS-6854 #comment try this patch 2014-09-30 20:35:19 +05:00
Brian West
7c89c21153 FS-6860 #resolve this was fixed once but was lost in the last sync 2014-09-26 09:00:09 -05:00
Anthony Minessale
f7de058acd FS-6854 #resolve 2014-09-25 21:44:02 +05:00
Anthony Minessale
9e72c8477f fix possible buffer overrun in websocket uri and sync the ws.c between sofia and verto (missing code from last commit) 2014-09-24 01:09:44 +05:00
Anthony Minessale
59e71341db fix possible buffer overrun in websocket uri and sync the ws.c between sofia and verto 2014-09-23 20:17:20 +05:00
Jeff Lenk
571cf932dc fix VS2010 build warning 2014-08-16 18:22:41 -05:00
Anthony Minessale
24413bfa11 copy changes from verto ws.c to sofia 2014-08-16 00:43:25 +05:00
Anthony Minessale
2411550727 add homer capture line to websocket transport 2014-08-11 21:02:25 +05:00
Brian West
327146cecf Fix WS Compile on MSVC2012 2014-07-25 11:34:08 -05:00
Anthony Minessale
6c80281ce9 buffer websocket headers and body before sending to avoid fragmentation 2014-07-17 01:07:57 +05:00
Anthony Minessale
cc75547672 merge ws.c change to sofia 2014-07-12 04:39:41 +05:00
Anthony Minessale
0685027bd8 FS-6574 --resolve 2014-06-09 14:29:08 -04:00
Michael Jerris
b5a223cd1b CID:1215201 Explicit null dereferenced 2014-05-22 15:39:59 +00:00
Anthony Minessale
f0aa0fc1d8 seek chain cert from wss.pem just cat together the cert, the key and the chain cert into wss.pem 2014-05-20 23:18:38 +05:00
Anthony Minessale
88ce7dae1c minor tweak to make ws code work in blocking mode properly when used outside sofia 2014-05-07 06:13:27 +05:00
Michael Jerris
906467b360 fix log message on sending tport ping over ws to log error in failure cases 2014-05-01 14:20:27 -04:00
Michael Jerris
cfd8d28bc8 silence clang unused function warnings and get rid of some unused functions 2014-05-01 09:03:19 -04:00
Anthony Minessale
2cdae46b19 FS-6476 regression where sock would sometimes drop while reading logical frames 2014-04-29 18:25:05 -04:00
Anthony Minessale
61e22e8b50 FS-6476 --resolve 2014-04-22 23:25:41 +05:00