Commit Graph

42 Commits

Author SHA1 Message Date
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
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
Marc-André Moreau
e0966bbfff Merge branch 'master' of github.com:mrthebunny/FreeRDP 2014-03-10 23:08:17 -04: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
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
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
Dan Bungert
66ecabb647 Final cleanups - merge ready. 2013-10-28 16:59:02 -06:00
Dan Bungert
eb25e45149 TLS over TLS maybe working. 2013-10-24 12:58:06 -06:00
Marc-André Moreau
e9787c7a9d libfreerdp-core: minor TS Gateway fixes 2013-10-24 12:56:43 -06: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
Marc-André Moreau
0dd5788266 libfreerdp-core: minor TS Gateway fixes 2013-10-11 02:10:02 -04:00
Marc-André Moreau
90ce8be9fc freerdp-core: added Terminate event 2013-06-18 16:55:23 -04:00
Marc-André Moreau
2bd6808432 freerdp: merge with master 2013-06-05 10:31:01 -04:00
Martin Fleisz
120960fd4d libfreerdp-core: Added support for server initiated shutdown to TSG 2013-05-22 10:58:11 +02:00
Marc-André Moreau
367ebf32a3 freerdp: make use of stream macros to access members 2013-05-15 12:14:26 -04:00
Marc-André Moreau
51715636a5 freerdp: remove some deprecated stream utils 2013-04-29 22:35:15 -04:00
Hardening
7701c9d934 Replace printf(...) by fprintf(stderr, ...) 2013-03-28 23:06:34 +01:00
Marc-André Moreau
8b9ea43d78 libfreerdp-core: fix locking with TS Gateway 2013-03-27 20:06:10 -04:00
Marc-André Moreau
882c914e6c channels/tsmf: fix build 2013-03-21 14:45:03 -04:00
Marc-André Moreau
0031c4918e libfreerdp-core: add TS Gateway system message support 2013-03-14 12:57:45 -04:00
C-o-r-E
575a38794b libfreerdp: fixed parenthesis 2013-01-23 13:44:58 -05:00
Marc-André Moreau
f0c94562cc libfreerdp-core: TS Gateway cleanup and NTLM SingleHostData implementation 2013-01-09 12:05:34 -05:00
Marc-André Moreau
c317c60275 libfreerdp-core: reply to TSG ping PDUs 2012-12-13 10:49:52 -05:00
Marc-André Moreau
52353e2427 libfreerdp-core: TSG printf cleanup 2012-12-12 22:34:41 -05:00
Marc-André Moreau
7ff2be09b2 libfreerdp-core: more TSG memory cleanup 2012-12-12 22:03:40 -05:00
Marc-André Moreau
102abcbef2 libfreerdp-core: improve TSG memory cleanup 2012-12-12 20:02:56 -05:00
Marc-André Moreau
387a152299 libfreerdp-core: TSG reassembly refactoring 2012-12-12 15:55:42 -05:00
Marc-André Moreau
d3e0537d0d libfreerdp-core: more TSG memory cleanup 2012-12-12 00:49:15 -05:00
Marc-André Moreau
3aeb9eb197 libfreerdp-core: TSG partial cleanup 2012-12-11 23:34:51 -05:00
Marc-André Moreau
dc978a967c libfreerdp-core: improve receiving of TSG data 2012-12-11 19:17:57 -05:00
Marc-André Moreau
db91555564 libfreerdp-core: improved TSG asynchronicity 2012-12-10 18:56:53 -05:00
Marc-André Moreau
0f3d80d63f libfreerdp-core: start implementation of asynchronous RPC fragment receive 2012-12-10 15:43:07 -05:00
Marc-André Moreau
731e606c15 libfreerdp-core: start handling client call state 2012-12-07 21:09:55 -05:00
Marc-André Moreau
875c556d13 libfreerdp-core: change interlocked singly-linked list to synchronized Queue 2012-12-05 16:04:01 -05:00
Marc-André Moreau
dde2e60a56 libfreerdp-core: refactor RPC receiving as a synchronized queue 2012-11-28 22:03:18 -05:00
Marc-André Moreau
3634a1bbf1 libfreerdp-core: encapsulate received RPC PDU 2012-11-28 21:25:01 -05:00
Marc-André Moreau
5faebcd77a libfreerdp-core: start asynchronous receiving 2012-11-28 20:30:03 -05:00
Marc-André Moreau
3936a19914 libfreerdp-core: add asynchronous send queue 2012-11-28 13:38:01 -05:00
Marc-André Moreau
d0792ea4d1 libwinpr-synch: implement pipe-based semaphore 2012-11-28 12:47:04 -05:00