Commit Graph

97 Commits

Author SHA1 Message Date
akallabeth 90ce22283d Replaced direct settings access with getter/setter 2022-06-23 07:45:55 +02:00
dev 1c15073508 some compile fixes 2022-05-03 11:48:20 +02:00
akallabeth d68327ad74 Fixed const correctness of pPointer_Set
Pointer might need to be modified
2022-04-28 09:17:20 +02:00
akallabeth fb90ac280a Refactored color.h
* Remove implementations from header
* Rename functions to be FreeRDP specific
* Add deprecation define for old names
* Fixed missing includes
2022-04-28 08:40:47 +02:00
akallabeth 73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
akallabeth 752ac3b479
Fix #7793: Do not expose internal input API (#7794)
* Fixed GetFileInformationByHandle initializers

* Fix #7793: Do not expose internal input API

Slow-Path input uses UINT16 for scancodes on wire, but only the
lower byte is actually used. (the extended fields are sent in
keyboardFlags field)
Hide this implementation detail and adjust the API to use UINT8
for the code instead just like the corresponding Fast-Path PDU

* Added a warning for problematic slow path keyCodes
2022-04-13 09:34:05 +02:00
Armin Novak b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
akallabeth 8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak cefb4e1237 Use freerdp_settings_set and _strdup 2022-02-02 13:43:31 +00:00
Armin Novak ef8c6e9a51 Fixed deprecated mac symbols 2022-02-02 07:57:56 +00:00
akallabeth e6e6ed5dbd Cleaned up PubSub
* Callback arguments now const
* Fixed missing includes
2022-01-19 09:24:57 +01:00
Armin Novak 6f2c6625e4 Added FREERDP/WINPR prefix to define GIT_REVISION 2021-05-18 13:37:34 +02:00
Allan Nordhøy caac0a12c1 Spelling fixes for iOS strings 2020-04-23 08:01:07 +02:00
Armin Novak 72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak 7d89ea22d4 Unified initialization of OrderSupport
Added a library internal function freerdp_settings_set_default_order_support
which initializes the OrderSupport array of settings.
Now clients no longer need to set this up on their own, if they
do not implement their own hardware accelerated order processing.
2018-11-23 10:11:50 +01:00
Armin Novak 666ef4ab34 Fix #4864: Register pointer cache after PostConnect is called
With #4950 client side pointer implementation was made optional.
This addresses an issue that each client had to call
pointer_cache_register_callbacks on its own.
2018-11-20 09:49:39 +01:00
Armin Novak 990b8c23a9 Fixed PubSub function pointer casts. 2018-02-14 11:00:52 +01:00
Armin Novak 4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +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
Armin Novak 649d270ccd Fixed GDI_RGN->null initialization. 2016-10-06 13:43:15 +02:00
Armin Novak 5ba9f82843 Reformatted file. 2016-10-06 13:43:14 +02:00
Armin Novak e23a7e29a1 Removed obsolete code. 2016-10-06 13:43:10 +02:00
Armin Novak 22ddec810b Moved pre and post channel hooks. 2016-10-06 13:43:10 +02:00
Armin Novak 9c64e77a84 Disabled thread local storage on iOS.
iOS does not support Thread Local Storage.
Disabling it for now until a solution is found.
Print a compiler warning informing developers about this issue.
2016-10-06 13:43:10 +02:00
Armin Novak d35823cf69 Moved channel init code to core library. 2016-10-06 13:43:09 +02:00
Armin Novak dadc5262ae Removed static channel variables.
Global static variables do not work, if more than one instance
of an RDP client is running in the same process space.
Removed the varaibles where possible and replaced them with
thread local storage where necessary.
2016-10-06 13:43:09 +02:00
Armin Novak f0864108f9 Updated iOS client. 2016-10-06 13:43:08 +02:00
Armin Novak ebfe4fbce5 Fixed compile issues. 2016-10-06 13:43:04 +02:00
Armin Novak 36cbf1b583 Fixed error handling for channel load failures. 2016-03-14 13:13:43 +01:00
Armin Novak cbf2892ccc Implemented temporary certificate accept.
Certificates can now be accepted temporarily.
The callbacks for certificate validation have been
modified to extend the information presented to the user.
2016-02-05 02:04:57 +01:00
Bernhard Miklautz 196695e011 client/ios: fix unchecked strdups 2015-06-22 19:09:59 +02:00
Bernhard Miklautz bf73f4e4f1 Fix unchecked strdups
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Norbert Federa 8a53e5ee68 client/iOS: fix ios_context_new
- fixed wrong signature since ContextNew is BOOL now
- added error checking
2015-05-25 22:21:53 +02:00
Bernhard Miklautz 515502ffa5 change return types of callbacks to BOOL
* change all client/server callbacks to BOOL
* update all clients accordingly
* add multiple return value checks
* small fixes
2015-04-21 14:18:07 +02:00
Bernhard Miklautz 43695bc15d ios: updates to build with xcode6+
* update tool chain to use clang instead of gcc
* add compatibility function for fwrite
2015-04-21 14:16:32 +02:00
Armin Novak 8b5f2c97ce Fixed bitmap context for 15bit color depth 2015-02-26 18:01:05 +01:00
Armin Novak ecad3d5b5c Fixed iOS undeclared identifier error. 2015-01-20 12:42:02 +01:00
Armin Novak 0700b806c1 Using freerdp_channels_disconnect now. 2015-01-20 11:25:14 +01: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
Mehul Dhorda 58ab355bad Call redraw only when region is invalidated
Added a condition to redraw a rect only when region is invalidated. For
example. this avoids a redraw when only the cursor changes on the
remote machine.
2014-11-19 11:48:12 -08:00
Marc-André Moreau 98965d4258 client/iOS: remove deprecated includes 2014-11-15 13:02:09 -05:00
Bernhard Miklautz 0313ca3622 libfreerdp: always build "MONOLITHIC"
"libfreerdp" consisted of multiple (small) single libraries. If the cmake
option MONOLITHIC was used only one library was build combining all of
the libfreerdp-* libraries.
The only exceptions to this are libfreerdp-server and libfreerdp-client these
are build as separate libraries.

This commit obsoltes non-monolithic builds and makes monolithic builds
the default. The cmake option MONOLITHIC is also removed.
2014-09-12 00:19:53 +02:00
Rene Rheaume 15ad357e1a Recompressed images with FileOptimizer 6.8 (an open-source mass file recompression tool for Windows) 2014-08-08 20:12:25 -04:00
Rene Rheaume 151e5de3d4 Recompressed PNG images again 2014-08-06 23:10:23 -04:00
Rene Rheaume 281ab78481 Recompressed losslessy PNG and JPEG images 2014-08-06 22:37:14 -04:00
Mike Gilbert ae1fdf6153 Remove execute bit from many files 2014-07-20 00:52:35 -04:00
Bernhard Miklautz 6a49bcfe40 winpr: always build "monolitic"
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.

The only exception is winpr-makecert-tool which is still build as extra
library.

This obsoletes complex_libraries for winpr.
2014-07-10 11:10:58 +02:00
Marc-André Moreau 2a82684521 channels: cleanup unused freerdp channels global functions 2014-06-11 16:27:31 -04:00
Martin Fleisz 43e08997f1 Merge pull request #1633 from MicahChase/master
Bluetooth Keyboard Fix
2014-04-22 08:36:25 +02:00
Marc-André Moreau 4bbd78a80b libfreerdp-core: remove unnecessary usage of freerdp_channels_data 2014-02-15 15:26:34 -05:00