Commit Graph

127 Commits

Author SHA1 Message Date
Marc-André Moreau
ddedc574f3 freerdp: remove tcp, uds utils 2014-11-12 14:06:34 -05:00
Armin Novak
7ceddc73e9 Decreased logging verbosity. 2014-09-15 19:51:58 +02:00
Armin Novak
d178e33db5 Decreased logging verbosity. 2014-09-15 19:51:37 +02:00
Armin Novak
2f519d7f16 Replaced logging in libfreerdp with wlog defines. 2014-09-15 08:48:46 +02:00
Armin Novak
6762d73ae1 Fixed winpr_HexDump calls. 2014-09-09 16:33:05 +02:00
Armin Novak
b22b897389 Reformatted changed files. 2014-09-09 16:32:22 +02:00
Armin Novak
f8eae11bf3 Fixed calling of dump functions, updated API 2014-09-09 16:31:46 +02:00
Armin Novak
f4c133eaf8 Replaced custom logging mechanism with WLog wrapper. 2014-08-07 16:51:24 +02:00
Marc-André Moreau
04968b18c4 libfreerdp-core: replace all OpenSSL built-in BIOs by new full duplex BIOs 2014-06-01 21:37:20 -04:00
Marc-André Moreau
a8be174e03 libfreerdp-core: remove ineffective full duplex locks 2014-06-01 11:20:13 -04:00
Marc-André Moreau
b1416af362 libfreerdp-core: add locks to disable full duplex BIOs (currently unsafe) 2014-05-30 14:53:10 -04:00
Hardening
dd6d829550 Allow transport_write calls to be non-blocking
This big patch allows to have non-blocking writes. To achieve
this, it slightly changes the way transport is handled. The misc transport
layers are handled with OpenSSL BIOs. In the chain we insert a
bufferedBIO that will bufferize write calls that couldn't be honored.

For an access with Tls security the BIO chain would look like this:
  FreeRdp Code ===> SSL bio ===> buffered BIO ===> socket BIO

The buffered BIO will store bytes that couldn't be send because of
blocking write calls.

This patch also rework TSG so that it would look like this in the
case of SSL security with TSG:
                                         (TSG in)
                              > SSL BIO => buffered BIO ==> socket BIO
                             /
FreeRdp => SSL BIO => TSG BIO
                             \
                              > SSL BIO => buffered BIO ==> socket BIO
                                        (TSG out)

So from the FreeRDP point of view sending something is only BIO_writing
on the frontBio (last BIO on the left).
2014-05-21 17:42:31 +02:00
Sandor Oroszi
d447f122c3 libfreerdp-core: fix misplaced sec_trailer in rpc_auth_3 PDU 2014-05-20 17:15:26 +02:00
Hardening
9f1d0201ec Changes for base64
This patch changes the prototype for decode_base64 so that the encode / decode
method are consistant (encode(BYTE *) => char* and decode(char*) => BYTE*).
It also does some improvements with unrolling loops so that end conditions are
tested only at the end.
The patch also adds some unitary tests.
Before the patch base64_decode() made valgrind complain about uninitialized
bits, after valgrind is happy and very quiet.
2014-05-11 22:49:10 +02:00
Hardening
597cba042a Fix some compilation warnings 2014-04-29 16:02:31 +02:00
Marc-André Moreau
769502ec72 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-04-26 13:47:01 -04:00
Zhang Zhaolong
e64a64dcd6 core: fix memory leak in case of error out. 2014-04-26 13:44:28 +08:00
Zhang Zhaolong
69eee0709d core: fix memory leak in case of error out. 2014-04-26 12:08:30 +08:00
Zhang Zhaolong
24fce3a749 core: fix memory leak in case of error out. 2014-04-26 12:05:52 +08:00
Marc-André Moreau
3ee6494d36 libfreerdp-core: cleanup GatewayUsageMethod setting 2014-04-24 17:05:10 -04:00
Benoit LeBlanc
9e859ad11f rpc_client_stop() : Avoid waiting infinitely for rpc client thread if connection failure occurs while in "synchronous receive" mode. 2014-04-24 14:07:11 -04:00
Hardening
ef38a5e55d Fix multiple WWW-Authenticate headers
This patch fixes the case with the server trying to negociate the authentication
method and returning multiple WWW-Authenticate headers.
2014-04-19 09:14:14 +02:00
Hardening
2edd8bee12 Misc fixes to check OOM 2014-04-10 21:10:19 +02:00
Marc-André Moreau
4093f1a715 Merge pull request #1782 from hardening/oom_cases
Treat OOM cases
2014-04-09 10:39:31 -04:00
Hardening
1d1844aabd Treat OOM cases 2014-04-09 16:07:06 +02:00
Hardening
4210890acd Fix corner cases in http parsing
This patch adds checks for malloc / strdup, and free all memory
when such call fails.
2014-04-09 15:00:38 +02:00
Benoît LeBlanc
3e1dfc6311 updated context error messages. utility macros for getting error code CLASS/TYPE 2014-03-21 13:45:43 -04:00
Benoît LeBlanc
d1b9565f51 Added context-specific error management.
Added error codes to replace connectErrorCode.
2014-03-20 18:19:54 -04:00
Marc-André Moreau
e0966bbfff Merge branch 'master' of github.com:mrthebunny/FreeRDP 2014-03-10 23:08:17 -04:00
Benoît LeBlanc
557c082458 Merge branch 'master' of git://github.com/awakecoding/FreeRDP 2014-03-05 16:35:22 -05:00
Dan Bungert
3b7fd4ceb6 Improved Gateway error handling
* General improvements to reduce the case where something bad happens
  and RDP hangs around forever without closing.
* Specific error code improvement for CAP related login rejection.
2014-03-04 09:39:39 -07:00
Marc-André Moreau
8a44b2baa6 libfreerdp-core: add spn-class option 2014-02-12 00:43:02 -05:00
Marc-André Moreau
cdcd290c44 wfreerdp: fix most build warnings 2014-02-10 22:12:13 -05:00
Benoît LeBlanc
bb9fa6979d Fix compilation on windows (variable declaration was not in standard C) 2014-01-08 21:02:40 -05:00
Benoît LeBlanc
ac6385448b tsg_write: return error when transport layer is closed 2013-12-20 18:24:29 -05:00
Benoît LeBlanc
3dddce811c rpc client thread: added periodic check on transport layer state, replacing an infinite wait operation. 2013-12-20 18:23:57 -05:00
Benoît LeBlanc
ad4d5c1ce7 Added timeout on blocking send, receive operations 2013-12-20 18:22:29 -05:00
Benoît LeBlanc
44e7d2f36c error handling in rpc and transport functions 2013-12-20 17:56:59 -05:00
Benoît LeBlanc
9245d364cc Fixed handling gateway authentication error
Handle NULL pdu
2013-12-18 12:59:53 -05:00
Benoît LeBlanc
3adff0ec60 - added CANCELEDBYUSER error code.
- AUTHENTICATIONERROR error code correclty set on gateway authentication (http error 401)
- Better error handling on connection errors and user cancelation
2013-12-13 10:11:36 -05:00
Benoît LeBlanc
8c1f836ac8 - SSL verification callback: send correct hostname and port
- Gateway Authentication callback.
- Handling “use same credentials”
2013-12-06 22:15:45 -05:00
Marc-André Moreau
85b7ad90fe libfreerdp-core: fix possible crash on unauthorized TS Gateway error 2013-12-05 17:31:33 -05:00
Marc-André Moreau
9829504fc1 libfreerdp-core: start async transport thread after successful transport-level connection 2013-11-01 10:24:19 -04:00
Marc-André Moreau
3bc47a2bf8 libfreerdp-core: fix leaks and potential use after free 2013-10-31 21:12:06 -04:00
Marc-André Moreau
8609a19cac Merge branch 'master' of github.com:FreeRDP/FreeRDP 2013-10-17 17:34:16 -04:00
Dan Bungert
04c2e4aef6 Gateway: Logoff crash fix
This addresses a race condition where the freerdp client
may crash on logoff.
2013-10-17 14:53:39 -06:00
Dan Bungert
486250b182 Gateway: Parsing fix for Create Tunnel Response
This fix addresses a logon issue that may occur when a logon
message is present.
2013-10-17 14:51:04 -06:00
Marc-André Moreau
c058095251 libfreerdp-core: cleanup TS Gateway code 2013-10-11 05:07:33 -04:00
Marc-André Moreau
0dd5788266 libfreerdp-core: minor TS Gateway fixes 2013-10-11 02:10:02 -04:00
Armin Novak
61c0c98dac Fixed missing free for subbuffers of packet. 2013-09-05 12:14:34 +02:00