Commit Graph

299 Commits

Author SHA1 Message Date
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
David Fort
824d09169e rdp: fix byte and packet counters
Best to count bytes directly at the transport level.
2019-11-04 07:39:35 +01:00
asapelkin
82eadad4a4 Fix some static analizer warnings 2019-10-22 15:39:54 +02:00
Armin Novak
733cc36462 Setting freerdp_last_error in gateway error response. 2019-09-24 09:42:13 +02:00
Armin Novak
f93d625cde Use GetTickCount64 instead of GetTickCountPrecise. 2019-09-02 15:46:36 +02:00
Armin Novak
f51a9bafcc Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak
4ad0770a7e Silenced function pointer cast warnings for BIO_callback_ctrl 2019-02-21 13:53:51 +01:00
Armin Novak
82863a8518 Refactored NLA to be self contained. 2018-12-05 10:55:06 +01:00
Armin Novak
ecac998340 Fixed rdg bio cleanup.
When attaching the RDG BIO to the TLS BIO also transfer ownership.
2018-11-13 12:22:09 +01:00
Armin Novak
3c35a098f5 Fixed direct rdg front bio access. 2018-11-13 11:24:04 +01:00
Armin Novak
b4fc0c75ce Made rdpRdp opaque 2018-11-13 11:22:37 +01:00
Armin Novak
5f4843191b Replaced BIO_free with BIO_free_all
There is no point in using BIO_free with a custom recursion
to free up stacked BIOs if there is already BIO_free_all.
Using it consistently avoids memory leaks due to stacked BIOs
not being recursively freed.
2018-11-08 12:09:49 +01:00
Armin Novak
f269a0ce5b Fixed sockfd/socketBio resource leak. 2018-10-25 13:19:45 +02:00
akallabeth
8fe3ac5d26
Merge pull request #4902 from akallabeth/gw_refactor_3
Gateway refactoring
2018-10-17 12:23:10 +02:00
Armin Novak
3b7f522eb7 Release stream in transport_write in all error cases. 2018-10-02 10:31:23 +02:00
Armin Novak
9516c251c7 Made TSG struct opaque 2018-09-28 12:00:45 +02:00
Martin Fleisz
f9e52c1850
Merge pull request #4815 from akallabeth/async_transport_remove
Removed +async-transport options
2018-08-24 09:48:51 +02:00
Ondrej Holy
47595a857f core/transport: Fix leak found by covscan
0 is valid return value from socket().

leaked_handle: Handle variable "sockfd" going out of scope leaks the handle.
2018-08-22 14:34:02 +02:00
Armin Novak
c3a26b0d6a Removed +async-transport options
The async transport option is broken by design.
If used the main loop is called from the transport thread and the
main thread of the application.
Unless the transport layer is refactored to just work on queues
(input and output) this option will never work, therefore remove it.
2018-08-22 13:56:37 +02:00
Armin Novak
b59b0a4425 Added error log messages. 2018-05-04 09:11:41 +02:00
Martin Fleisz
296b19e172
Merge pull request #4596 from p-pautov/rdg_ssl_fixes
RDG related fixes for better compatibility with mstsc
2018-05-03 10:23:12 +02:00
David Fort
0f968b782c proxy: cleanup SOCKS support and add user/password support 2018-05-02 10:51:16 +02:00
p-pautov
fda76349b9
Fix Windows build. 2018-04-26 02:11:04 -07:00
Pavel Pautov
a0019ec79c Fallback to RDG RPC transport only if server does not support RDG HTTP and
error out in other cases - invalid RDG SSL cert, bad credentials, PAA failue, etc.
2018-04-25 18:36:43 -07:00
Jiri Sasek
b1c1549ad1 SOCKS proxy support 2018-04-23 21:01:01 +02:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak
a419677e8f Fix invalid handle offset. 2018-03-06 13:58:40 +01:00
David Fort
41823080f9 Fix users of Stream_GetPosition() that returns size_t 2017-12-11 22:38:58 +01:00
David Fort
11ee81be60 Fix XRandr for old systems and MacOSX
We need a recent enough version of XRandr to correctly detect monitor.
Also this patch adds some typo or style fixes.
2017-12-08 10:59:38 +01:00
dodo040
b81f168f0e initial commit for kerberos support 2017-11-13 16:20:55 +01:00
Armin Novak
ce00f4dd8f Silence WLog_ERR messages if last error is set. 2017-11-06 14:02:22 +01:00
tditsch
a16d9a2ade refactored Bugfix 2017-09-19 10:18:41 +02:00
tditsch
feca6d9750 Fixed endless loop when RDP Server sends SERVER_DENIED_CONNECTION 2017-09-18 17:29:16 +02:00
Armin Novak
e455cc1745 Fixed SSL error checks in transport_ssl_cb
Fix error define use. The callback is called from
ssl3_dispatch_alert or dtls1_dispatch_alert where the alert define
is left shifted by 8. Additionally ignore close notifcation. (#3814)
2017-03-01 10:46:00 +01:00
akallabeth
7ce1dd0a6c Merge pull request #3791 from akallabeth/kerberos
Kerberos (Rebased #3417)
2017-02-23 13:46:34 +01:00
Armin Novak
b905e0c26d Fixed initialisation of kerberos context. 2017-02-23 11:06:47 +01:00
Armin Novak
70baa6fe26 Added additional connect errors. 2017-02-22 09:50:59 +01:00
Armin Novak
363109c581 Using preloaded logger. 2017-02-22 09:42:56 +01:00
Armin Novak
1497b5654e Using SSL defines instead of magic numbers. 2017-02-22 09:34:20 +01:00
Armin Novak
50cd702a15 Updated KRB5 detection, added error case handler
* Linking against KRB5 library now, no dynamic usage.
* Added proper CMake detection script for KRB5 detection
* Added some additional error conditions.
2017-02-21 10:54:34 +01:00
HenryJacques
56c0219907 Update transport.c 2017-02-20 16:04:33 +01:00
Armin Novak
c249705085 Fixed scanbuild warnings. 2017-02-20 13:45:19 +01:00
Ilya Shipitsin
12f5368819 make cppcheck even more happier:
[channels/tsmf/client/gstreamer/tsmf_X11.c:317] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:322]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:470] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:472] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/tsmf_media.c:179] -> [channels/tsmf/client/tsmf_media.c:181]: (warning) Either the condition '!stream' is redundant or there is possible null pointer dereference: stream.
[client/Windows/wf_cliprdr.c:2219] -> [client/Windows/wf_cliprdr.c:2222]: (warning) Either the condition '!formatDataResponse' is redundant or there is possible null pointer dereference: formatDataResponse
[client/Windows/wf_cliprdr.c:2445] -> [client/Windows/wf_cliprdr.c:2448]: (warning) Either the condition '!fileContentsResponse' is redundant or there is possible null pointer dereference: fileContentsResponse.
[client/X11/xf_cliprdr.c:911] -> [client/X11/xf_cliprdr.c:913]: (warning) Either the condition '!clipboard' is redundant or there is possible null pointer dereference: clipboard.
[client/X11/xf_graphics.c:504] -> [client/X11/xf_graphics.c:506]: (warning) Either the condition '!xfc' is redundant or there is possible null pointer dereference: xfc.
[libfreerdp/core/transport.c:861] -> [libfreerdp/core/transport.c:863]: (warning) Either the condition '!transport' is redundant or there is possible null pointer dereference: transport.
[server/shadow/shadow_server.c:777] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:778] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:779] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:781] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:782] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:783] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:784] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:785] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:787] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:789] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
2017-01-26 14:44:19 +05:00
Martin Fleisz
ac090520c3 Fix compilation with OpenSSL 1.1.0 using MSVC 2017-01-09 16:43:28 +01:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
David Fort
f92860de87 Applied astyle formatting 2016-10-14 15:12:48 +02:00
David Fort
60cffef8d1 Release the reread event on transport_free 2016-10-14 15:12:48 +02:00
David Fort
fd7ebdc6a5 Took in account comment remarks 2016-10-14 15:12:48 +02:00
David Fort
71fd5cc148 Limit the time passed in transport check loop
This patch make it possible to limit the time that is passed when we call
XXX_check_fds functions. This should smooth the treatment between handling inputs
and handling incoming bitmap updates.
The default maximum time is set to 100 ms.
2016-10-14 15:12:48 +02:00
Armin Novak
8fbc885f19 Removed unused variable. 2016-10-13 16:57:51 +02:00