Commit Graph

738 Commits

Author SHA1 Message Date
Siva Gudivada
7a2215fd40
Backport TLS1.2 enforcement and version control from master to stable2.0 (#8094)
* Add a new command line arg to enforce tls1.2

* Add better explanation of FreeRDP_EnforceTLSv1_2

(cherry picked from commit ce2e3ab0c7)

* Regenerated settings helpers

* backport prev cherry-pick

* Cleanup tls_prepare

* TLS version control

* added settings for minimal and maximal TLS versions supported
* refactorisation of the force TLSv1.2 setting

* cleanup from prev cherry-pick

* updated change log

Co-authored-by: akallabeth <akallabeth@posteo.net>
Co-authored-by: David Véron <david.veron@rubycat.eu>
2022-07-28 14:12:12 +02:00
akallabeth
a4c86723a3 Unifiy string append functions
(cherry picked from commit f25261e271)
2022-06-29 14:42:22 +02:00
akallabeth
7f35f29546 Fixed compilation warnings 2022-05-13 12:56:18 +02:00
Armin Novak
0f9efe1972 Fixed /gt:xxx settings
* Disable websocket support with RPC
* Use settings getter/setter

(cherry picked from commit 882b91d986)
2022-04-19 15:00:28 +02:00
Armin Novak
2008751c04 Replaced WINPR_ASSERT defines, use include 2022-03-28 12:08:51 +02:00
Armin Novak
baf35cece9 Implemented #4341: Default to /network:auto
If no arguments are supplied, default to the behaviour of
/network:auto. This ensures the default experience is using the
best available graphics options.
As soon as any /network, /bpp, /rfx, /gfx, ... argument is used
only use these.

(cherry picked from commit d3168a1436)
2022-03-09 16:19:34 +01:00
Armin Novak
658a72980f Abort autoreconnect if a user cancel action was triggered.
(cherry picked from commit 15e7647f20)
2022-03-07 15:24:08 +01:00
akallabeth
de805f8565 Decreased logging verbosity for INFO level
(cherry picked from commit e6b0373859)
2022-03-03 10:52:00 +01:00
akallabeth
d39a7ba5c3
Stable 2.0 backports (#7366)
* Fixed typo in changelog

* Fix FIPS mode support and build with OpenSSL 3.0

FreeRDP fails to build with OpenSSL 3.0 because of usage of the `FIPS_mode`
and `FIPS_mode_set` functions, which were removed there. Just a note that
the FIPS mode is not supported by OpenSSL 1.1.* although the mentioned
functions are still there (see https://wiki.openssl.org/index.php/FIPS_modules).
Let's make FreeRDP build with OpenSSL 3.0 and fix the FIPS mode support.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1952937
(cherry picked from commit 26bf2816c3)

* winpr: avoid calling FIPS_mode() with OpenSSL 3.0

Fixes: 26bf2816c3
(cherry picked from commit 0c81c73c8d)

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0 (#7210)

* winpr/crypto: Exit cleanly when EVP_EncryptInit_ex fails

The `EVP_EncryptInit_ex` function may fail in certain configurations.
Consequently, FreeRDP segfaults in `EVP_CIPHER_CTX_set_key_length`.
Let's handle the `EVP_EncryptInit_ex` failures and exit cleanly in
such case.

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0

Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.

Relates: https://github.com/openssl/openssl/issues/14392
Fixes: https://github.com/FreeRDP/FreeRDP/issues/6604
(cherry picked from commit 67f3fff2c8)

Conflicts:
	winpr/libwinpr/crypto/cipher.c

* Fix TestUnicodeConversion on big endian machines (#7219)

Wide character literals are stored in native byte order.
Use an array of bytes as a reference instead.

Fixes: https://github.com/FreeRDP/FreeRDP/issues/6968
(cherry picked from commit 5208a67ea7)

* Fixed async-input quit

* Fix data write on usb channel

* Bitmap update fix (#7349)

* Added checks for bitmap width and heigth values

Data received from the server might have invalid values for bitmap
with or height. Abort parsing if such a value is found.
Reported by Sunglin from the Knownsec 404 team & 0103 sec team

* Added checks for glyph width & height

* Fixed #7363: Length checks in ConvertUTF8toUTF16

(cherry picked from commit 623a77258a)

* Implemented missing TSG debug functions

(cherry picked from commit c06c463806)

* Refactored RPC gateway parser

Utilize wStream instead of custom binary parsing code, add proper
input validation.
Reported by Sunglin from the Knownsec 404 team & 0103 sec team

(cherry picked from commit f0b44da67c)

* Replaced chmod with safer fchmod

* Use fchmod so the file may not change underneath
* Add unit tests for SetFileAttributesA
* Add warning logs for unsupported flags

(cherry picked from commit c8571dd5fd)

* Updated changelog and version

* Added more explicit warning for deprecated command line

* Add exit codes for more errors

(cherry picked from commit aa4c3dfb8a)

* Updated changelog.

Co-authored-by: Ondrej Holy <oholy@redhat.com>
Co-authored-by: Mike Gilbert <floppym@gentoo.org>
Co-authored-by: Ondrej Holy <ondrejholy@users.noreply.github.com>
Co-authored-by: Ian Weir <mr.weir@me.com>
2021-10-21 08:30:50 +02:00
akallabeth
537a877627 Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.

(cherry picked from commit 6b36c6d417)
2021-07-27 11:57:33 +02:00
akallabeth
187cbdfe2c Use specific names for drive hotplug special values
(cherry picked from commit b1be3d78fc)
2021-03-09 16:08:08 +01:00
akallabeth
f4c87729e3 Backported #6865: Disable websockets command line option 2021-03-08 15:33:23 +01:00
akallabeth
136a58fbd0 Added -DDEFINE_NO_DEPRECATED CMake option
With that option all symbols marked deprecated are no longer
compiled. This helps testing compatibility of external apps.
2021-03-01 10:58:24 +01:00
Fabio Fantoni
689ca72285 Minor typo fix
From debian packages patch done by Mike Gabriel
<mike.gabriel@das-netzwerkteam.de>

(cherry picked from commit 5c408e080e)
2021-02-25 09:51:41 +01:00
Marc-André Moreau
3047a73744 freerdp-client: don't enable vmconnect mode based on PCB field presence in .RDP file
(cherry picked from commit 4e14e7d41e)
2021-02-25 09:51:41 +01:00
Armin Novak
1c590a71e7 Added option to remap scancodes
(cherry picked from commit d7bf6553c5)
2021-02-25 09:51:41 +01:00
Simon Tatham
aa9b644e3a Command-line option to choose an X selection.
I personally find it more convenient to have pasted data written to
the X11 PRIMARY selection, so that I can paste it with a fast middle-
button click, than to write to CLIPBOARD which typically needs a key
sequence or menu action.

This commit adds a command-line option to let me express that
preference: now I can say "/clipboard:use-selection:PRIMARY" on the
command line, which not only enables clipboard transfer but also says
which X selection I want it to talk to. The previous options
"+clipboard" and "-clipboard" are also still supported.

(cherry picked from commit 64948b96c4)
2021-02-25 09:51:41 +01:00
akallabeth
87db6078f0 Do not eliminate original error status.
(cherry picked from commit 050a68fec9)
2021-02-25 09:51:41 +01:00
akallabeth
2dbd33b5bb Refactored freerdp_client_settings_command_line_status_print_ex
Now returns 0 if help or version information was requested.

(cherry picked from commit 531dd81836)
2021-02-25 09:51:41 +01:00
akallabeth
cb8af3271e Allow autoreconnect for ERRINFO_GRAPHICS_SUBSYSTEM_FAILED
As discussed in #4717 allow autoreconnect to succeed if that
specific error code was returned as disconnection reason.

(cherry picked from commit 552a7ca25f)
2020-12-02 14:12:33 +01:00
akallabeth
92488d5a3c Use freerdp_settings_[s|g]et* api to access proxy vaiables.
Fixes #6414

(cherry picked from commit 44ea09e7ad)
2020-08-05 11:48:39 +02:00
Martin Fleisz
3522179074 Add GatewayMessageType to public API
(cherry picked from commit 174f3257c9)
2020-08-05 10:59:50 +02:00
Martin Fleisz
c424322be3 Implement gateway message callback for Windows, Wayland and X11 clients
(cherry picked from commit 2fe8e762d2)
2020-08-05 10:59:50 +02:00
Bernhard Miklautz
7f2de8419a fix [client channels]: move exported API calls to client/common
The functions mappedGeometryRef and mappedGeometryUnref are API
functions ([1]) but were implemented in the geometry channel.
In case FreeRDP was built with BUILTIN_CHANNELS=OFF those functions
weren't available globally but used by the video channel.

Now the functions are fixed part of the freerdp-client library and
therefore available for all channels.

[1] exported in freerdp/client/geometry.h

Fixes #6236

(cherry picked from commit 1628939227)
2020-06-22 09:30:42 +02:00
akallabeth
b83f79c3b3 Read newline from stdio on certificate accept
(cherry picked from commit 5b842bc7a7)
2020-06-16 09:05:01 +02:00
akallabeth
8d9464fbc5 Fixed BehaviourSanitizer warning in rdp parser
(cherry picked from commit 771332c04e2dbad964d0cb11a86ff561e792bc35)
2020-05-18 17:10:01 +02:00
akallabeth
64bec7586d Replaced strtok with strtok_s
(cherry picked from commit 7890833af8)
2020-05-18 16:56:03 +02:00
akallabeth
63730ab349 Fixed warning messages for RDP file options
networkautodetect and bandwidthautodetect are both boolean options
which must match each other. Added adequate warnings.

(cherry picked from commit 5f5bf10703)
2020-05-08 11:06:02 +02:00
Armin Novak
bc4615e5ed Added expert settings /tune and /tune-list 2020-05-05 07:46:10 +02:00
Lukas Fink
c668d66e88 Added ability to add usb devs via id and addr simultaneously
It is now possible to add usb devices both via vid+pid and via bus+addr
at the same time. To do this, the ids are directly
given to the corresponding command line options:
/usb🆔<vid+pids>,addr:<bus+addrs>
The dev option still works like before: /usb:id,dev:<vid+pids> or
/usb:addr,dev:<bus+addrs>
2020-05-05 07:46:09 +02:00
akallabeth
973731824b Fixed #6099: Add a flag for legacy hash entries
If a legacy entry is found in certificate hash store print
additional information to the user informing about the change
with FreeRDP 2.0
2020-04-28 14:03:19 +02:00
akallabeth
ccaad04876 Fix initialization of LargePointer flags
Capability exchange is first reading server capabilities,
mask these with local settings and send only what both support.
2020-04-28 14:03:19 +02:00
Martin Fleisz
9223eea61e
Merge pull request #5974 from akallabeth/cmd_avc420_fix
Cmd avc420 fix
2020-04-02 08:41:47 +02:00
Martin Fleisz
ca34fe4c12
Merge pull request #5985 from akallabeth/log_version_debug
Added buildconfig output to debug log level.
2020-03-26 09:55:46 +01:00
Martin Fleisz
43d3f89ce7
Merge pull request #5988 from akallabeth/rdp_parser_leak
Fixed memory leak in rdp file parser.
2020-03-24 12:17:05 +01:00
akallabeth
fdf151698d Fixed memory leak in rdp file parser. 2020-03-23 16:06:26 +01:00
akallabeth
453372a4bf Add option to adjust the tcp ack timeout
On high latency links the default of 9 second timeout might be too
strict. Adjusting this for all users will result in a long time
for connections to fail, so let these with high latency links
adjust the value manually.
2020-03-23 08:59:38 +01:00
akallabeth
82449a9c7d Added buildconfig output to debug log level. 2020-03-20 13:05:01 +01:00
akallabeth
efb588db04
Added deprecation warning to gfx-h264 2020-03-15 10:33:53 +01:00
akallabeth
1441e78b70
Fixed gfx-h264 option parsing. 2020-03-15 10:33:34 +01:00
Armin Novak
90bc3e793a Fixed missing config include. 2020-03-09 14:57:20 +01:00
Armin Novak
6ac1b6d78e Fixed strncmp, use _strnicmp 2020-03-06 11:37:35 +01:00
Armin Novak
316fb38e67 Added new option /cert that unifies all.
* The mess with /cert-tofu, /cert-ignore et al is now unified in
  a single option.
* Added the option to add fingerprint:<hash>:<hex string> multiple
  times to /cert to build a list of accepted certificate
  fingerprints
* Added a deprecation warning to older /cert-* options
2020-03-06 11:37:35 +01:00
Armin Novak
4eb4f58fbb Updated CMake channel detection
* Now both, dynamic and static channel entries can be defined by
  a single channel.
* Added better logging to distinguish between static and dynamic
  channel messages.
2020-02-28 12:53:39 +01:00
Martin Fleisz
da354feed0 Add dynamic channel part for rdpsnd channel 2020-02-28 12:53:39 +01:00
Armin Novak
829497b313 Made CHANNEL_TSMF optional and deprecated. 2020-02-26 13:56:43 +01:00
Ondrej Holy
3240485bfd Do not advertise /usb in help output if the channel is not built
The help output advertise an option and an example for usb redirection
regardless of the fact whether the urbdrc channel was built or not.
This is confusing for people. Let's do not show /usb in help if it is
not built.
2020-02-26 13:51:52 +01:00
Martin Fleisz
7ae8a158a0
Merge pull request #5707 from akallabeth/kbd_codepage
Added KeyboardCodePage option
2020-02-25 14:50:51 +01:00
Armin Novak
30275e7ac3 Added keyboard language codepages and listing option 2020-02-21 11:57:36 +01:00
Martin Fleisz
e304428a5f
Merge pull request #5857 from akallabeth/scanbuild_fixes
Scanbuild fixes
2020-02-12 10:16:54 +01:00