Commit Graph

1083 Commits

Author SHA1 Message Date
Marc-André Moreau
736bcf2bd6 libfreerdp-core: fix async input mode for FocusInEvent, KeyboardPauseEvent 2014-12-15 11:35:35 -05:00
Marc-André Moreau
9b28562cc1 libfreerdp-core: fix faulty rdpTransport server-side initialization 2014-12-15 10:23:06 -05:00
Marc-André Moreau
e2f377ae11 libfreerdp-core: fix TSG thread shutdown and input freeze problem 2014-12-15 09:42:04 -05:00
Marc-André Moreau
74bef0edca Merge pull request #2275 from awakecoding/master
TS Gateway Fixes
2014-12-12 09:33:52 -05:00
Marc-André Moreau
aa23c4eaaa libfreerdp-core: fix random TS Gateway disconnects with async modes 2014-12-12 09:08:39 -05:00
Norbert Federa
939f1c639a Standard RDP Security Layer Levels/Method Overhaul
[MS-RDPBCGR] Section 5.3 describes the encryption level and method values for
standard RDP security.

Looking at the current usage of these values in the FreeRDP code gives me
reason to believe that there is a certain lack of understanding of how these
values should be handled.

The encryption level is only configured on the server side in the "Encryption
Level" setting found in the Remote Desktop Session Host Configuration RDP-Tcp
properties dialog and this value is never transferred from the client to the
server over the wire.
The possible options are "None", "Low", "Client Compatible", "High" and
"FIPS Compliant". The client receices this value in the Server Security Data
block (TS_UD_SC_SEC1), probably only for informational purposes and maybe to
give the client the possibility to verify if the server's decision for the
encryption method confirms to the server's encryption level.
The possible encryption methods are "NONE", "40BIT", "56BIT", "128BIT" and
"FIPS" and the RDP client advertises the ones it supports to the server in the
Client Security Data block (TS_UD_CS_SEC).
The server's configured encryption level value restricts the possible final
encryption method.
Something that I was not able to find in the documentation is the priority
level of the individual encryption methods based on which the server makes its
final method decision if there are several options.
My analysis with Windows Servers reveiled that the order is 128, 56, 40, FIPS.
The server only chooses FIPS if the level is "FIPS Comliant" or if it is the
only method advertised by the client.

Bottom line:
* FreeRDP's client side does not need to set settings->EncryptionLevel
(which was done quite frequently).
* FreeRDP's server side does not have to set the supported encryption methods
list in settings->EncryptionMethods

Changes in this commit:

Removed unnecessary/confusing changes of EncryptionLevel/Methods settings

Refactor settings->DisableEncryption
* This value actually means "Advanced RDP Encryption (NLA/TLS) is NOT used"
* The old name caused lots of confusion among developers
* Renamed it to "UseRdpSecurityLayer" (the compare logic stays untouched)

Any client's setting of settings->EncryptionMethods were annihilated
* All clients "want" to set all supported methods
* Some clients forgot 56bit because 56bit was not supported at the time the
code was written
* settings->EncryptionMethods was overwritten anyways in nego_connect()
* Removed all client side settings of settings->EncryptionMethods
The default is "None" (0)
* Changed nego_connect() to advertise all supported methods if
settings->EncryptionMethods is 0 (None)
* Added a commandline option /encryption-methods:comma separated list of the
values "40", "56", "128", "FIPS". E.g. /encryption-methods:56,128
* Print warning if server chooses non-advertised method

Verify received level and method in client's gcc_read_server_security_data
* Only accept valid/known encryption methods
* Verify encryption level/method combinations according to MS-RDPBCGR 5.3.2

Server implementations can now set settings->EncryptionLevel
* The default for settings->EncryptionLevel is 0 (None)
* nego_send_negotiation_response() changes it to ClientCompatible in that case
* default to ClientCompatible if the server implementation set an invalid level

Fix server's gcc_write_server_security_data
* Verify server encryption level value set by server implementations
* Choose rdp encryption method based on level and supported client methods
* Moved FIPS to the lowest priority (only used if other methods are possible)

Updated sample server
* Support RDP Security (RdpKeyFile was not set)
* Added commented sample code for setting the security level
2014-12-12 02:17:12 +01:00
Marc-André Moreau
cc2321d359 libfreerdp-core: fix leak and use after free in tsg ListDictionary usage 2014-12-11 17:08:22 -05:00
Marc-André Moreau
d8e10ac04a freerdp: patch leaks reported by valgrind when using TS Gateway 2014-12-11 11:25:34 -05:00
Bernhard Miklautz
7b413fb951 nego: print message when bypassing gateway
When "detect" is used as gateway usage method (which is the default)
it is tried to by-pass gateway connection for local hosts.
The detection might take some time therefore print a message that people
are aware that a detection is tried.

Fixes #2171
2014-12-08 19:00:05 +01:00
Norbert Federa
3baaa9a523 Merge pull request #2256 from llyzs/llyzs
libfreerdp-core: enable ipv6 listener.
2014-12-05 16:06:23 +01:00
Vic Lee
bcee2ec3cd libfreerdp-core: enable ipv6 listener. 2014-12-05 10:06:35 +08:00
Marc-André Moreau
fdd2dc7601 freerdp: patch valgrind leaks, cleanup 2014-12-03 14:17:27 -05:00
Marc-André Moreau
01ac15a879 libfreerdp-core: fix crash on failed redirect 2014-12-03 11:48:27 -05:00
Marc-André Moreau
6ccce86140 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	winpr/libwinpr/thread/thread.c
2014-12-03 10:10:50 -05:00
Marc-André Moreau
c17a831367 Merge pull request #2240 from nfedera/fix-2014-12-01-01
xfreerdp: pinch/pan fixes and smart-sizing
2014-12-02 14:04:49 -05:00
Norbert Federa
25f66d2e6d xfreerdp: added smart sizing, mt gesture fixes
- removed setting ScalingFactor
- added settings SmartSizingWidth and SmartSizingHeight
- changed option /smart-sizing to optionally support <width>x<height>
- consolidated transformation of input event coordinates
- rdp8 gfx ignored scaling and panning offsets: fixed
- never resize window on panning/pinching
- simplified keyboard multitouch gesture debugging emulation
- disabled keyboard multitouch gesture emulation debug code via define
2014-12-01 11:56:44 +01:00
Bernhard Miklautz
e139bd0fb8 core client side: set flag to crypt license
Client side code always tells the server that it is capable of processing
encrypted licensing packages (SEC_LICENSE_ENCRYPT_SC) but didn't set
the recently added flag to indicate that.

Fixes #2196
2014-12-01 11:12:34 +01:00
Mario Lombardo
3c634f91db Rename tcp-functions as they are conflicting with qemu functions 2014-11-29 21:14:39 +01:00
Marc-André Moreau
a323a0823d Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-11-28 11:23:53 -05:00
Bernhard Miklautz
daa3e7c7f8 tsg: fix possible free of initialized memory 2014-11-27 15:08:07 +01:00
Bernhard Miklautz
5066a5e455 tsg: rpc_send_enqueue_pdu always free buffer
rpc_send_enqueue_pdu returns -1 on error but the type of error isn't
distinguishable. Therefore make sure that the buffer gets always freed.
The only exception to this is when the pdu was already queued. Then the
dequeuing function should take care of freeing the buffer when
processing the pdu.
2014-11-27 14:39:47 +01:00
Bernhard Miklautz
96ae2df5a4 tsg: unwind recursion in tsg_read 2014-11-26 19:46:32 +01:00
Bernhard Miklautz
c0525574c8 transport: handle all return values of tsg_read
tsg_read can also return 0 which means that no data (complete PDU) is
currently available. This case wasn't handled properly.

Fixes #2056
2014-11-26 19:46:32 +01:00
Bernhard Miklautz
81a6c43938 tsg: fix segfault
Revert false positive from commit 585d9101b7
buffer shouldn't be freed since it is set and used in a stream.
2014-11-26 19:46:32 +01:00
Marc-André Moreau
d95af00117 Merge branch 'awakecoding' of github.com:vworkspace/FreeRDP 2014-11-25 11:20:07 -05:00
Marc-André Moreau
1c88822ccb libfreerdp-core: treat GCC data block 0xC009 as CS_MULTITRANSPORT 2014-11-19 21:00:28 -05:00
Marc-André Moreau
3f5aa863cb libfreerdp-core: fix server-side activated state 2014-11-19 14:21:23 -05:00
Marc-André Moreau
d6e6db05e9 libfreerdp-core: sanitize NSCodec capabilities 2014-11-19 09:39:47 -05:00
Marc-André Moreau
8a7a71a7b6 Merge pull request #2213 from akallabeth/wlog_callback_appender
Wlog callback appender
2014-11-17 09:41:58 -05:00
Armin Novak
e61acfe6b4 Fixed null pointer dereference. 2014-11-17 01:26:31 +01:00
Armin Novak
bc963c43d8 Fixed double free. 2014-11-17 01:13:47 +01:00
Armin Novak
727a7a9aed Fixed memory leaks. 2014-11-17 01:08:38 +01:00
Armin Novak
9ea898a3c2 Fixed memory leaks. 2014-11-17 01:07:07 +01:00
Armin Novak
2958a2c0c5 Fixed memory leaks. 2014-11-17 01:00:55 +01:00
Armin Novak
037c612c33 Fixed memory leak. 2014-11-17 00:58:43 +01:00
Armin Novak
458f948c7a Fixed memory leak. 2014-11-17 00:41:06 +01:00
Armin Novak
aa92017d86 Fixed memory leak. 2014-11-17 00:36:50 +01:00
Armin Novak
a594a15220 Fixed memory leaks. 2014-11-17 00:28:17 +01:00
Armin Novak
bde7b156a8 Fixed uninitialized data warning. 2014-11-17 00:05:12 +01:00
Armin Novak
9e5be6f7e8 Fixed API nonnull warning. 2014-11-17 00:00:09 +01:00
Armin Novak
585d9101b7 Fixed memory leaks. 2014-11-16 23:06:03 +01:00
Armin Novak
8d4589b1e1 Replaced fprintf error messages with WLog. 2014-11-16 12:21:38 +01:00
Marc-André Moreau
496ce10637 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-11-15 12:37:29 -05:00
Norbert Federa
be7a10e660 core: use zero padding in suppress output pdu
Some legacy rdp servers seem to expect a zero padding after the
allowDisplayUpdates byte, probably because they incorrectly parse the
value as uint32.
2014-11-14 11:25:05 +01:00
Marc-André Moreau
ddedc574f3 freerdp: remove tcp, uds utils 2014-11-12 14:06:34 -05:00
Marc-André Moreau
0e7c95c421 freerdp: remove deprecated eventing system 2014-11-12 13:18:18 -05:00
Marc-André Moreau
589c21d819 libfreerdp-utils: remove rail utils 2014-11-12 10:18:53 -05:00
Marc-André Moreau
68ee5df7d9 winpr: fix build warnings 2014-11-11 11:21:34 -05:00
Marc-André Moreau
a48ed7239d Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	libfreerdp/core/update.c
2014-11-11 09:55:48 -05:00
Marc-André Moreau
e685acdbc5 Merge pull request #2194 from hopToDev/master
Added SIGPIPE handling for iOS.
2014-11-11 09:43:38 -05:00
Martin Fleisz
53f38d3e89 Merge pull request #2189 from llyzs/llyzs
Support Continuous Auto-Detection.
2014-11-11 08:42:48 +01:00
Vic Lee
36f0281ff8 libfreerdp-core: auto-detect defines. 2014-11-11 10:14:44 +08:00
Mehul Dhorda
256eab682b Added SIGPIPE handling for iOS. 2014-11-10 11:52:29 -08:00
Marc-André Moreau
b7c6e9c050 Merge pull request #2188 from hopToDev/master
Ignore T.128 FlowPDU in Share Control header
2014-11-10 13:54:12 -05:00
Mike McDonald
7d5963a1e6 Fixed crash caused by trying to cast and dereference a NULL hChannel. 2014-11-07 18:06:14 -05:00
Mehul Dhorda
e8b8ae1900 Added comment to clarify flow control PDU fields. 2014-11-07 14:58:58 -08:00
Vic Lee
8eaeeebecc libfreerdp-core: support continuous auto-detection. 2014-11-07 16:18:49 +08:00
Marc-André Moreau
a538e791b3 shadow: add improved pointer updates 2014-11-06 17:25:41 -05:00
Mehul Dhorda
29c42cfc0e Fixed incorrect values for PDUTypeFlow.
Swapped values for PDU_TYPE_FLOW_RESPONSE and PDU_TYPE_FLOW_STOP to
match the T.128 spec.
2014-11-06 10:08:58 -08:00
Mehul Dhorda
f64d620a3b Ignore T.128 FlowPDU in Share Control header
According to the Microsoft RDP specification, T.128 flow control PDUs
should be ignored when reading Share Control headers.
(http://msdn.microsoft.com/en-us/library/cc240576.aspx). This patch
checks if we got a flow control PDU (length = 0x8000) and advances the
stream to ignore the PDU.
2014-11-05 11:32:46 -08:00
Marc-André Moreau
c5c9423ccf winpr: fix Win32 build warnings 2014-11-04 10:44:55 -05:00
Hardening
e04f90eada Offer to disable bulk compression when using remoteFx
This patch adds a skipCompression field in surface commands struct so that
we can disable bulk compression with remoteFx.
2014-11-04 16:14:53 +01:00
Vic Lee
18428a43d0 libfreerdp-core: distinguish continuous/connect-time autodetect. 2014-11-04 13:41:04 +08:00
Hardening
7b108f1aa8 Merge pull request #2141 from zhangzl2013/polyline
fix polyline.
2014-10-31 22:15:13 +01:00
Norbert Federa
62dbcac0c7 xfreerdp: fix glyph index primary drawing order
The fOpRedundant field of the GlyphIndex primary drawing order
(MS-RDPEGDI, chapter 2.2.2.2.1.1.2.13) was neglected which resulted in some
severe text rendering errors.
2014-10-29 20:56:26 +01:00
Vic Lee
152d525a05 libfreerdp-core: server-side auto-detect feature. 2014-10-29 00:49:49 +08:00
Vic Lee
0e7797ffca libfreerdp-core: server-side mcs message channel. 2014-10-29 00:49:27 +08:00
Marc-André Moreau
02646b349f Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	libfreerdp/core/gcc.c
2014-10-25 10:29:06 -04:00
Norbert Federa
9c2e90df7d core: fix pointer caps, slowpath kbd and a gcc fix
* According to MS-RDPBCGR 2.2.7.1.5 the pointerCacheSize is optional
  and its absence or a zero value indicates missing client support for
  the New Pointer Update.

* Added and fixed some comments regarding the meaning of the KBDFLAGS_DOWN
  keyboard flag and how it is currently used in the code.
  "Fixed" the slow path keyboard input to generate the same keyboard flags
  as the corresponding fast path code.

* Some arbitrary value was used for the ConnectPDULength in the GCC
  Conference Create Response. According to MS-RDPBCGR 4.1.4 this value must
  be ignored by the client so we encode a zero value instead.
2014-10-22 12:27:07 +02:00
Bernhard Miklautz
4dcc0957f1 Fix build on windows
Problem was introduces by a non pull request push for ipv6 support
2014-10-22 12:16:40 +02:00
Mike McDonald
5fa6fa7013 Merge branch 'master' of https://github.com/awakecoding/FreeRDP into awakecoding-staging 2014-10-20 14:42:46 -04:00
Jean-Louis Dupond
0dc0e01568 Add ipv6 client support 2014-10-17 12:08:39 +02:00
Marc-André Moreau
1d47b16f3c Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-10-14 20:59:37 -04:00
Marc-André Moreau
00e3533230 libfreerdp-core: expose API for FreeRDS WTSVirtualChannelRead 2014-10-10 17:19:38 -04:00
Marc-André Moreau
11ae267518 libfreerdp-core: expose new API to allow FreeRDS virtual channel hooking 2014-10-10 16:11:42 -04:00
Marc-André Moreau
9ce862edc8 Merge pull request #2135 from erbth/wfreerdp
Added lock key synchronization to wfreerdp
2014-10-09 09:05:58 -04:00
Zhang Zhaolong
3de5c62bf3 fix polyline. 2014-10-09 18:11:38 +08:00
Marc-André Moreau
d6a2f76dd6 libfreerdp-core: server-side virtual channel code style cleanup 2014-10-07 14:56:57 -04:00
erbth
58c392e72e Added lock key synchronization to wfreerdp 2014-10-03 16:27:47 +02:00
Bernhard Miklautz
f40053577f core: add support for set keyboard indicators PDU
Server Set Keyboard Indicators PDU MS-RDPBCGR 2.2.8.2.1

* add server side code
* add support for client callback
2014-10-03 12:10:44 +02:00
Mike McDonald
0357a38e31 Fix to properly negotiate fast-path fragmentation. 2014-09-30 21:12:20 -04:00
Marc-André Moreau
2d40fe7644 libfreerdp-core: fix cloning of LoadBalanceInfo 2014-09-26 15:18:40 -04:00
Marc-André Moreau
9daa8bd36f libfreerdp-gdi: handle egfx desktop resize 2014-09-25 22:08:10 -04:00
Marc-André Moreau
ca1cec64d8 libfreerdp-core: update RDP8 virtual channels 2014-09-25 17:31:05 -04:00
Marc-André Moreau
72fff184dd libfreerdp-core: fix RemoteFX/autodetect incompatibility issue with 2008 R2 2014-09-24 17:23:12 -04:00
Mike McDonald
092855fe99 Fixed gcc_write_conference_create_request to send a constant byte of 0x2A instead of attempting to encode the length of the payload. Sending the length is causing older RDP clients to fail the connection when the payload length of the server data blocks exceeded 256 bytes(which is nearly always the case when RDP security is negotiated). Traces of Windows 2003, 2008R2, 2012, 7, and 8 show that Windows always sends a constant of 0x2A (OCTET STRING) followed by a constant of 0x14 (ConnectGCCPDU). 2014-09-23 22:04:02 -04:00
Marc-André Moreau
af858e8f2a shadow: disable RemoteFX if connection type is not LAN 2014-09-23 18:19:05 -04:00
Marc-André Moreau
7574788ba5 libfreerdp-core: fix GCC core data block negotiation 2014-09-22 11:38:33 -04:00
Marc-André Moreau
c4ad706c34 libfreerdp-core: improve bitmap codec negotiation 2014-09-21 15:40:27 -04:00
Marc-André Moreau
6cb4b59426 libfreerdp-core: fix server-side receiving of X224 disconnect TPDU 2014-09-20 20:19:59 -04:00
Marc-André Moreau
c4588fb14f libfreerdp-core: remove dependency on OPENSSL_Applink on Windows 2014-09-19 17:11:56 -04:00
Marc-André Moreau
72e7507bee Merge branch 'shadow' of github.com:awakecoding/FreeRDP
Conflicts:
	libfreerdp/core/capabilities.c
2014-09-19 14:39:43 -04:00
Marc-André Moreau
d102e746c8 Merge branch 'awakecoding' of github.com:vworkspace/FreeRDP
Conflicts:
	libfreerdp/core/license.c
	libfreerdp/core/nego.c
	winpr/libwinpr/synch/wait.c
2014-09-19 14:38:25 -04:00
Marc-André Moreau
3ddbb128cc libfreerdp-core: add SurfaceFrameBits function to combine frame marker with surface commands 2014-09-19 14:23:17 -04:00
Marc-André Moreau
aa2e6dacbb shadow: fix frame acks + bitmap negotiation 2014-09-19 12:06:12 -04:00
Marc-André Moreau
09fc388e03 shadow: add RefreshRect/SuppressOutput support 2014-09-18 22:18:58 -04:00
Mike McDonald
ad8268d059 Minor fix to server side RDP security negotiation. 2014-09-18 19:44:52 -04:00
Mike McDonald
a228952a69 Modified server code to honor the negotiated setting for SEC_LICENSE_ENCRYPT_SC in the security exchange PDU (which controls the encryption of license PDUs from the server to the client). 2014-09-18 19:43:28 -04:00
Mike McDonald
65d38b54be Modified server code to honor the negotiated settings for 1) SEC_LICENSE_ENCRYPT_SC in the security exchange PDU (which controls the encryption of license PDUs from the server to the client) and 2) ENC_SALTED_CHECKSUM in the bitmap capability set. 2014-09-18 19:38:04 -04:00
Mike McDonald
62f4b0be2e Modified code to honor the negotiated settings for 1) ENC_SALTED_CHECKSUM in the general capability set extraFlags field and 2) DRAW_ALLOW_SKIP_ALPHA in the bitmap capability set drawingFlags field. 2014-09-18 19:31:06 -04:00