Commit Graph

724 Commits

Author SHA1 Message Date
Marc-André Moreau
6cca235ae6 libfreerdp-core: move timezone code from info.c to timezone.c 2012-02-16 01:53:58 -05:00
Marc-André Moreau
aa7b83ff1e libfreerdp-core: fix issue #436 2012-02-15 16:33:51 -05:00
Marc-André Moreau
5d7e55fe9d libfreerdp-core: fix timezone redirection 2012-02-15 16:28:47 -05:00
Bernhard Miklautz
ab057141b0 core: Fixed segfault when connecting with nla 2012-02-14 16:00:13 +01:00
Marc-André Moreau
4fe4cd35e3 libfreerdp-server: added server-side CredSSP stubs 2012-02-13 22:27:59 -05:00
Marc-André Moreau
1d3e3a466d libfreerdp-core: started server-side NLA 2012-02-13 21:49:41 -05:00
Marc-André Moreau
06330a7cb3 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2012-02-13 17:51:56 -05:00
Marc-André Moreau
708ba9bd03 libfreerdp-core: expanded input API 2012-02-13 17:51:42 -05:00
Marc-André Moreau
e22023cc76 libfreerdp-cache: start NineGrid cache 2012-02-12 20:29:33 -05:00
Marc-André Moreau
233b0b6ef4 libfreerdp-gdi: add mem3blt support 2012-02-12 19:41:39 -05:00
Marc-André Moreau
f7a71079dd xfreerdp: reintroduce Polygon drawing 2012-02-12 17:14:59 -05:00
Pawel Jakub Dawidek
928dc74782 Remove tls->cert field, make tls_get_certificate() static and free certificate after use. 2012-02-12 19:08:16 +01:00
Marc-André Moreau
d37e6091b0 libfreerdp-core: verify TLS certificate with both TLS and NLA 2012-02-12 12:46:53 -05:00
Pawel Jakub Dawidek
3e464c3a7d Plug some resource leaks. 2012-02-12 18:09:09 +01:00
Pawel Jakub Dawidek
f74ea2f034 Write fingerprint to proper descriptor. 2012-02-12 18:09:03 +01:00
Pawel Jakub Dawidek
d2b82c4166 Advertise persistent bitmap cache only if it is enabled. 2012-02-11 15:11:10 +01:00
Pawel Jakub Dawidek
3aa804f176 Before asking for element from the PRIMARY_DRAWING_ORDER_FIELD_BYTES[] array, check if the array is big enough. 2012-02-11 14:33:54 +01:00
Pawel Jakub Dawidek
cb4668ca68 When acting as server, accepth client's color depth only if it is smaller than ours. This is what Windows server does. 2012-02-11 14:33:48 +01:00
Marc-André Moreau
5ae4d88c14 libfreerdp-core: don't call freerdp_context_free() from freerdp_free() 2012-02-10 15:50:29 -05:00
Jay Sorg
d51db08c5c libfreerdp-core: fix memory leaks and double free 2012-02-10 12:35:22 -08:00
Marc-André Moreau
6bddb08713 Merge pull request #415 from pjd/fixes
Advertise ENC_SALTED_CHECKSUM support.
2012-02-10 12:14:41 -08:00
Marc-André Moreau
79884c8b72 Revert "RDP6 compression"
This reverts commit 8302b724e1.
2012-02-10 15:06:58 -05:00
Pawel Jakub Dawidek
dd957c3097 Set ENC_SALTED_CHECKSUM flag when support for salted checksums is enabled. 2012-02-10 20:33:14 +01:00
Pawel Jakub Dawidek
957bad3d52 Rename secure_checksum settings field to salted_checksum (the same for --secure-checksum flag) to match ENC_SALTED_CHECKSUM flag's name. 2012-02-10 20:33:07 +01:00
cool
8302b724e1 RDP6 compression 2012-02-09 22:20:24 -11:00
Marc-André Moreau
caae69e980 libfreerdp-core: change source descriptor from MSTSC to FREERDP 2012-02-08 14:45:24 -05:00
Pawel Jakub Dawidek
e73a525ad5 Move the comment into correct place. 2012-02-08 12:47:22 +01:00
Pawel Jakub Dawidek
e9f89af8a5 The fastpath header can be two or three bytes long. Check also the latter case. 2012-02-08 12:03:39 +01:00
Marc-André Moreau
58e08a7726 Merge pull request #407 from hcgpalm/master
Fix info_packet misalignment
2012-02-07 20:27:16 -08:00
Marc-André Moreau
0975c0f07e libfreerdp-core: improve error checking in certificate validation 2012-02-07 22:16:57 -05:00
Otavio Salvador
986890b8b9 Merge pull request #404 from pjd/server_slow_path_input
Implement server-side support for slow-path Input Event PDU.
2012-02-07 05:01:53 -08:00
Pawel Jakub Dawidek
eb8c5c5f81 Implement server-side support for slow-path Input Event PDU. 2012-02-07 13:53:00 +01:00
Pawel Jakub Dawidek
1fa1331a54 Modify the UnicodeKeyboardEvent callback to also include flags argument.
According to the specification first two bytes contain keyboardFlags.
Those keyboardFlags are a bit different than in the regular (non-unicode)
Keyboard Event. There is no KBD_FLAGS_EXTENDED here and also when
key is pressed there is neither KBD_FLAGS_DOWN nor KBD_FLAGS_RELEASE flag
set. When key is released the KBD_FLAGS_RELEASE flag is set.
2012-02-07 12:22:01 +01:00
Pawel Jakub Dawidek
2ee9cc5e18 Simplify code by using per_read_length() instead of reimplementing it. 2012-02-07 11:16:47 +01:00
Pawel Jakub Dawidek
b75b5eb8a1 After DEACTIVATE ALL PDU server can send MCS Disconnect Provider Ultimatum PDU to disconnect.
Handle such condition and exit from xfreerdp gracefully (almost, exit status is still != 0).
2012-02-06 23:10:45 +01:00
Pawel Jakub Dawidek
d6592a17a9 Windows XP can send short (and non-standard) DEACTIVATE_ALL PDUs. Handle them properly. 2012-02-06 22:39:43 +01:00
Pawel Jakub Dawidek
4a950cedd7 Better packet length checking. 2012-02-06 22:39:33 +01:00
Christer Palm
ded92bc9cd Fix password field length 2012-02-06 01:27:21 +01:00
Marc-André Moreau
47de99062d libfreerdp-core: added --certificate-name option for explicitly specifying a certificate name 2012-02-04 15:16:41 -05:00
Marc-André Moreau
ffec1c2062 libfreerdp-core: improve and clarify certificate checking 2012-02-04 15:04:03 -05:00
Marc-André Moreau
4695faae38 libfreerdp-core: added check for certificate name against hostname 2012-02-04 02:21:39 -05:00
Pawel Jakub Dawidek
1619b43781 Fix problem where we check errno even for status == 0. This way when connection was properly terminated, but errno had EAGAIN value from before, we looped idenfiniately. 2012-02-03 14:44:45 +01:00
Pawel Jakub Dawidek
feb20edda7 Plug memory leak in case of an empty file and terminate string with '\0'. 2012-02-03 09:00:39 +01:00
Marc-André Moreau
9c81ff8022 libfreerdp-core: change certificate store directory name to match OpenSSL 2012-02-02 18:33:26 -05:00
Marc-André Moreau
521f956c00 libfreerdp-core: merging certificate.c with certstore.c 2012-02-02 18:20:17 -05:00
Marc-André Moreau
26d68997eb Merge branch 'master' of github.com:FreeRDP/FreeRDP 2012-02-02 17:36:16 -05:00
Marc-André Moreau
bae5de89e1 libfreerdp-utils: refactoring of certificate store 2012-02-02 17:36:07 -05:00
Pawel Jakub Dawidek
9d2ea6e937 According to specification bits from the first octet and bit 8 from the second octet (if there is more than one octet) shall not all be ones.
Before that change integer >= 0xFF80 was encoded into two bytes instead of three.
While here also add support for encoding integers into three bytes.
2012-02-02 22:46:23 +01:00
Pawel Jakub Dawidek
7c9bbcc8e1 Add missing two bytes for pad2Octets field in FASTPATH_UPDATETYPE_SYNCHRONIZE packet. 2012-02-02 17:54:36 +01:00
Marc-André Moreau
9e4d76648b libfreerdp-core: fix more memory leaks 2012-02-01 21:11:46 -05:00
Marc-André Moreau
b4e542ba46 libfreerdp-core: fix multiple memory leaks detected by valgrind 2012-02-01 18:42:20 -05:00
Norbert Federa
a3a4e9afa9 core: fixed segfault caused by double free of password_cookie blob 2012-02-01 17:58:06 +01:00
Martin Fleisz
c872b4ca80 Init update->SuppressOutput for clients too 2012-01-31 08:11:22 -08:00
Marc-André Moreau
bb61820bfb Merge pull request #380 from pjd/stream
Use stream API instead of accessing stream fields directly.
2012-01-31 04:44:58 -08:00
Pawel Jakub Dawidek
d733924df8 Use stream API instead of accessing stream fields directly.
This include use of stream_attach(), so 'size' is properly set.
2012-01-31 13:36:53 +01:00
Pawel Jakub Dawidek
d2860f3210 Use stream_attach() so that the 'size' field in the stream structure
is properly set. This allows to assert in stream API that we don't
try to access memory outside stream buffer.
2012-01-31 12:15:54 +01:00
Marc-André Moreau
413fc774c5 Merge pull request #378 from adambprotiviti/redir-pw-fix
Fixed RDS Farm Redirection
2012-01-30 22:55:37 -08:00
Adam Brand
873e904abd Final commit for fixing password issue; removed debug strings. 2012-01-30 20:54:29 -08:00
Adam Brand
927bc71780 Fixed issue with RDS farm redirection and passwords. 2012-01-30 20:49:27 -08:00
Adam Brand
e11dd6d588 Fixed some obvious things; still doesn't work. 2012-01-30 18:33:46 -08:00
Adam Brand
4aeb52aace First attempt at fixing the password issue; this segfaults unfortunately. 2012-01-30 17:54:46 -08:00
Marc-André Moreau
e33f21b958 libfreerdp-utils: extend file utils to do path detection 2012-01-30 17:47:55 -05:00
Marc-André Moreau
012825e3b6 libfreerdp-core: fix code style in gcc.c 2012-01-29 15:05:34 -05:00
Marc-André Moreau
bde353b635 libfreerdp-core: fix reconnection for non IP-based redirection 2012-01-29 14:49:54 -05:00
Marc-André Moreau
005ffa0bb0 wfreerdp: fix mingw64 cross-compilation (Felix Wolfheimer) 2012-01-29 11:11:13 -05:00
Pawel Jakub Dawidek
31529071fd Add glue that enables server-side support for Standard RDP Security. 2012-01-25 17:16:44 +01:00
Pawel Jakub Dawidek
7207e945c3 - Ignore received encryption_method and encryption_level if we don't support encryption.
- Print a warning if we receive unregognized type.
2012-01-25 17:16:44 +01:00
Pawel Jakub Dawidek
daf565dbd3 Add complete implementation of gcc_write_server_security_data() function
that implements server-side Standard RDP Security.
2012-01-25 17:16:44 +01:00
Pawel Jakub Dawidek
0a97242b3c Add rdp_server_establish_keys() function that is responsible for
establishing encryption keys for server-side Standard RDP Security.
2012-01-25 17:16:44 +01:00
Pawel Jakub Dawidek
76f36461ff Add a note why we are skipping 8 bytes. 2012-01-25 17:16:44 +01:00
Pawel Jakub Dawidek
ee9739f490 Add API to load RSA key for Standard RDP Security in server mode. 2012-01-25 17:16:44 +01:00
Pawel Jakub Dawidek
f5033b1a7c - Don't fill client_random with 0x5e, we are going to fill it up with
random data in the next line.
- Use less magic numbers.
2012-01-25 17:16:44 +01:00
Pawel Jakub Dawidek
86910c8401 Add missing decryption. 2012-01-25 17:16:44 +01:00
Pawel Jakub Dawidek
d37cff01ed White-space fixes. 2012-01-25 17:15:44 +01:00
Pawel Jakub Dawidek
ac87b066fb Correct style. 2012-01-25 17:15:35 +01:00
Pawel Jakub Dawidek
31b6968263 Add a comment explaining why we always encode length in two bytes, eventhough we could use one byte sometimes. 2012-01-25 17:15:25 +01:00
Pawel Jakub Dawidek
61aa1dfb79 Add Standard RDP encryption suport for fastpath. Both input and output. 2012-01-25 17:15:17 +01:00
Pawel Jakub Dawidek
9c8a6bd8e9 Add some FASTPATH_INPUT_* enums. 2012-01-25 17:15:09 +01:00
Pawel Jakub Dawidek
68b9f65e87 Add --secure-checksum option that will enable usage of salted checksums
with Standard RDP encryption.
2012-01-25 17:14:58 +01:00
Pawel Jakub Dawidek
cea62dd9f6 Simplify code by using per_read_length() instead of reimplementing it. 2012-01-25 17:14:51 +01:00
Pawel Jakub Dawidek
af87360135 MCS data header might be 7 or 8 bytes long, depending on the length.
To reduce confusion a bit rename MCS_SEND_DATA_HEADER_LENGTH to
MCS_SEND_DATA_HEADER_MAX_LENGTH and also rename other defines that use
MCS_SEND_DATA_HEADER_MAX_LENGTH.
2012-01-25 17:14:44 +01:00
Pawel Jakub Dawidek
e2be360ec4 Add support for SEC_SECURE_CHECKSUM and FASTPATH_OUTPUT_SECURE_CHECKSUM flags. 2012-01-25 17:14:31 +01:00
Pawel Jakub Dawidek
4df52d7a42 Use rdp_read_security_header() to read security header. 2012-01-25 17:14:19 +01:00
Pawel Jakub Dawidek
b3a4be0298 We calculate checksum on plain text, so we must have already decrypt it, which means decrypt_use_count is off by one. Account for this. 2012-01-25 17:14:11 +01:00
Pawel Jakub Dawidek
207cb9b818 Fix typo: use & instead of | to check for flags. This fixes detection of requested protocols. 2012-01-25 17:13:53 +01:00
Pawel Jakub Dawidek
609d177412 Handle short writes properly in transport_write().
Before this change if short write (send) occured, we were trying to
resend without updating length variable, so we were trying to send
too much and the following undefined data were causing the other
side to terminate connection.
2012-01-24 11:46:35 +01:00
Pawel Jakub Dawidek
8e91faf139 - Rename rdp_establish_keys() to rdp_client_establish_keys() as it is only
responsible for establishing keys on the client side.
- Simplify rdp_client_establish_keys() by using rdp_write_header() and
  rdp_write_security_header() function instead of reimplementing them
  and by using existing defines instead of magic values.
2012-01-23 18:23:52 +01:00
Pawel Jakub Dawidek
164c8a0a67 Whitespace fixes. 2012-01-19 05:36:52 +01:00
Pawel Jakub Dawidek
8238f2369d - Simplify security_mac_signature() API.
- Introduce implementation of security_salted_mac_signature() that would be
  used to handle packets with SEC_SECURE_CHECKSUM flag.
2012-01-19 05:10:06 +01:00
Pawel Jakub Dawidek
ab4beb787f Implement signature verification in Server Security Data packet.
Because this signature doesn't protect against anything, only warn
the user if it is invalid.
2012-01-19 04:49:03 +01:00
Pawel Jakub Dawidek
44663ab332 Introduce more complete RSA API that implements:
- crypto_rsa_public_encrypt()
- crypto_rsa_public_decrypt()
- crypto_rsa_private_encrypt()
- crypto_rsa_private_decrypt()
2012-01-19 04:48:52 +01:00
Pawel Jakub Dawidek
a118afa879 Add Terminal Services Signing Keys. 2012-01-19 04:48:43 +01:00
Pawel Jakub Dawidek
3bbd2f28c7 Use CRYPTO_*_DIGEST_LENGTH defines instead of magic values. 2012-01-19 04:48:32 +01:00
Pawel Jakub Dawidek
af5501cdc5 Introduce CRYPTO_SHA1_DIGEST_LENGTH and CRYPTO_MD5_DIGEST_LENGTH that hold
number of bytes needed for a given hash.
2012-01-19 04:48:23 +01:00
Pawel Jakub Dawidek
9b07d525fb Introduce SIGNATURE_ALG_RSA and KEY_EXCHANGE_ALG_RSA defines and use them
instead of magic values.
2012-01-17 17:55:31 +01:00
Pawel Jakub Dawidek
6f418cb20b PROTOCOL_RDP is 0, so don't perform bitwise operations on it. 2012-01-17 17:52:12 +01:00
Pawel Jakub Dawidek
1dd33b49d5 The ber_write_length() function can store variable number of bytes (one or
three). We can't tell until we write other data and know the length, so don't
assume how much space will by consumed to store length. Bug was observed with
the mcs_write_connect_response() function, where the function assumed that
application tag will take three bytes, but it was taking five.
2012-01-17 14:17:04 +01:00
Marc-André Moreau
949bce4d54 wfreerdp: fix warnings and color conversion 2012-01-16 11:40:18 -05:00
Marc-André Moreau
757e41a0d5 Merge pull request #347 from pjd/pullreq
Use of stream_read() / stream_write()
2012-01-16 07:18:50 -08:00
Pawel Jakub Dawidek
7056f5f5ef Make use of stream_read(). 2012-01-16 15:56:47 +01:00