Commit Graph

1129 Commits

Author SHA1 Message Date
Armin Novak
0445eec0bc [client,common] fix /gateway option parsing
due to a bug the first letter of the gateway options was ignored.
2023-03-02 19:04:48 +01:00
Armin Novak
73158a040a [client,common] add warning functions
Added helper functions to inform a user about current state of a client
in use:
* freerdp_client_warn_exeprimental warns about unstable clients
* freerdp_client_warn_deprecated warns about clients to be dropped
2023-03-01 13:45:13 +01:00
akallabeth
b4e9c8b39f [build] removed complex libraries
* remove obsolete complex libraries helper
* fix static linking
2023-03-01 08:18:34 +01:00
Armin Novak
acc5e2d301 [client,common] use non blocking IO
when reading from stdin use non blocking IO so that we can check if the
session terminated in between.
2023-02-28 09:47:54 +01:00
akallabeth
ab5be61e89 [client,common] working REDIRECTION_VERSION6
* REDIRECTION_VERSION6 requires enabled multitransport, enable it
* Add a fallback if multitransport was disabled
2023-02-20 16:04:04 +01:00
akallabeth
45dfeabe92 [client,common] set default callbacks before ClientNew
ohterwise the default callbacks might override custom callbacks set by
an implementation by accident
2023-02-16 08:16:09 +01:00
Armin Novak
25023d3a3a [client,scard] fix missing callback instance arg
every callback requires context, add freerdp* instance just as the
Authenticate et al callbacks already have
2023-02-15 13:34:18 +01:00
Armin Novak
5d97a03bf4 [client] auto intialize callbacks
initialize all message/user query callbacks with client_cli_*
2023-02-15 13:34:18 +01:00
akallabeth
87b30958a6 [cyrpto] unify PEM read/write
use crypto_read_pem and crypto_write_pem in all places required
2023-02-12 20:17:11 +01:00
akallabeth
9e8fc60a45 [client,common] add openssl includes for TLS version 2023-02-12 20:17:11 +01:00
akallabeth
4499a55f43 [core,smartcardlogon] use rdpCertificate 2023-02-12 20:17:11 +01:00
akallabeth
2eda0aa2ea [core,settings] remove unused setting 2023-02-03 11:24:32 +01:00
Armin Novak
427a4fa057 [client,common] deprecate old gateway options 2023-02-03 11:08:46 +01:00
Armin Novak
923b068382 [client,common] unified credential hiding
* Unify command line credential string replace in a single function
* Extend the string replace, add all options containing a token or
  a password
2023-02-03 11:08:46 +01:00
Armin Novak
9d8954f56a [client,common] add new option /gateway
* unifies old /g, /gu, /gd, /gp, /gt, /gat and /gateway-usage-method
  options into a single one.
* add new option auto-consent:[on|off]
2023-02-03 11:08:46 +01:00
Armin Novak
57698ed1f9 [client,common] fixed possible memory leak 2023-02-03 11:08:46 +01:00
Armin Novak
cd48e17740 [gateway,settings] add GatewayAutoConsent option
with this option the client automatically accepts consent messages of
the gateway server.
2023-02-03 11:08:46 +01:00
Armin Novak
70f6c09ff4 [core] fix persistent bitmap cache setting
* Only activate if both, client and server support the capability
* Use settings getter to access setting
2023-01-26 09:30:17 +01:00
Armin Novak
c1174152c3 [client,common] print help on wrong list command 2023-01-25 14:27:15 +01:00
Rozhuk Ivan
a111b78530 [core] Rename TLS functions
Rename tls_ to freerdp_tls_ to avoid namespace conflicts with libtls
and probaly other tls crypto libs.
2023-01-14 08:50:26 +01:00
Armin Novak
070353bf90 added SDL2 client 2023-01-10 17:38:00 +01:00
akallabeth
82ba9ede9c [freerdp] use FREERDP_/UWAC_/RDTK_ prefix for conditional headers 2023-01-10 17:38:00 +01:00
Armin Novak
d66b165b8e [client,common] common touch handling 2023-01-10 17:38:00 +01:00
akallabeth
9a80afeb08 [client,cmdline] add support for .rdpw file extension 2022-12-21 16:11:57 +01:00
akallabeth
8c6ee2061b [client,cmdline] fixed /gfx parsing
* Fixed a bug not activating AVC444 when requested
* Unified legacy /gfx-h264 parsing with /gfx
2022-12-15 11:20:34 +01:00
Armin Novak
5f81005ecb [transport] remove polling loop
We no longer have a blocking polling loop in transport. Instead assume
there is more data after a packet was processed and let the transport
try again. If there is another packet ready, this repeats until only a
partly received (or no new data available) situation is reached.
2022-12-12 12:59:32 +01:00
akallabeth
3ddf99ad64 Fixed Wformat warnings 2022-12-09 15:58:26 +01:00
Armin Novak
7027699a5c [client,cmdline] remove -fast-path option
This option is quite an expert setting and should not be exposed that
prominently. Remove it as it can still be changed with the /tune option.
2022-12-06 16:41:24 +01:00
Armin Novak
3e3ed445b4 [client,file] add rdgiskdcproxy to settings
Adds a new option FreeRDP_KerberosRdgIsKdc to manually set the KDC url
to the gateway server url
2022-12-06 14:07:53 +01:00
Armin Novak
3b7d515f85 [client,file] add kdcproxyname to parsing options 2022-12-06 14:07:53 +01:00
Armin Novak
a5d9c3b846 [client,cmdline] fix order of arguments
option_starts_with was called with inverted arguments.
2022-11-29 22:29:29 +01:00
akallabeth
5799fb2018 Replace ConvertFromUnicode and ConvertToUnicode
* Use new ConvertUtf8ToWChar, ConvertUtf8NToWChar,
  ConvertUtf8ToWCharAlloc and ConvertUtf8NToWCharAlloc
* Use new ConvertWCharToUtf8, ConvertWCharNToUtf8,
  ConvertWCharToUtf8Alloc and ConvertWCharNToUtf8Alloc
* Use new Stream UTF16 to/from UTF8 read/write functions
* Use new settings UTF16 to/from UTF8 read/write functions
2022-11-28 10:42:36 +01:00
Armin Novak
c5e425242a [settings] Typo in GatewayHttpExtAuthSspiNtlm 2022-11-23 11:19:21 +01:00
akarl10
b1583d56c0 [rdg] implementation of http_extauth_sspi_ntlm 2022-11-16 20:28:53 +01:00
Armin Novak
5ecd62a5f7 [client,cmdline] Fix /enforce-tlsv1_2 parsing 2022-11-16 16:03:21 +01:00
akallabeth
450f8a1d7e Fixed wrong define check
The deprecated command line must only be used if
WITH_FREERDP_DEPRECATED_COMMANDLINE is defined
2022-11-04 14:46:58 +01:00
Armin Novak
5306c3ec0a Write an error log if a PEM file can not be read. 2022-11-03 11:06:15 +01:00
Armin Novak
3dc5ac74a9 Fix parsing of smartcard options 2022-10-27 11:55:49 +02:00
Armin Novak
5e1d7c0f8d Unified comparisons
* Use option_starts_with for all checks
* Use option_ends_with for all checks
* Use option_equals for all comparisons
2022-10-27 11:36:58 +02:00
Armin Novak
fa1bbfe1bd Fixed on/off string length checks 2022-10-27 10:13:57 +02:00
Armin Novak
605ff25269 Fixed string size for keyboard option parser 2022-10-27 10:13:57 +02:00
akallabeth
967749d43f Unify command line deprecation warning log messages 2022-10-27 10:13:57 +02:00
akallabeth
e3528e3728 Unified /app-* command line arguments 2022-10-27 10:13:57 +02:00
akallabeth
f7850f08aa Added option WITH_FREERDP_DEPRECATED_COMMANDLINE_COMMANDLINE
This allows building deprecated command line options without adding
deprecated functions to the build.
2022-10-27 10:13:57 +02:00
akallabeth
55362225cc Unified /kbd-* command line options
The number of /kbd-* options grew too large, unify them under a
single /kbd:<option1>,<option2>,... setting
2022-10-27 10:13:57 +02:00
akallabeth
d1a736273e Added deprecation log messages, fixed on|off parsing for /sec 2022-10-27 10:13:57 +02:00
akallabeth
391199cbeb Unified /*-cache command line options
There were multiple options enabling/disabling cache features.
Unifed them all under a single /cache:<option1>,<option2>,...
2022-10-27 10:13:57 +02:00
akallabeth
41284f47e7 Unify /gfx options
* Deprecate all gfx-* options
* Extend argument parsing for /gfx:<option1>,<option2>,...
2022-10-27 10:13:57 +02:00
akallabeth
181debc3d1 Remove /tls:enforce:ssl3 option
SSL3 is deactivated during connect anyway, so do not expose the
option
2022-10-20 10:51:50 +02:00
akallabeth
ef6842d249 Fixed TLS1_3_VERSION check and parse_tls_seclevel
* Only add TLS1_3_VERSION to array if the SSL library build against
  has support for TLS 1.3
* Fix wrong parse function call for 'seclevel'
2022-10-20 10:51:50 +02:00
Armin Novak
187b553b97 Allow overriding TLS version
Now use a generic option to allow setting all possible SSL/TLS versions.
Use /tls:enforce:[ssl3|1.0|1.1|1.2|1.3] to set accordingly
2022-10-19 20:31:53 +02:00
Armin Novak
119b8d4474 Unified command line options to list something
There are various options to list smartcards, monitors, keyboard
settings. Unify them all under a single /list:<something> option
2022-10-19 20:31:53 +02:00
Armin Novak
7e82c9f19f Cleaned up functions printing information 2022-10-19 20:31:53 +02:00
Armin Novak
1f6476016d Update command line option /sec*
* Deprecate /sec-* flags
* Allow multiple arguments for /sec
2022-10-19 20:31:53 +02:00
Armin Novak
ed3bc5c51a Only enable deprecated commandline with WITH_FREERDP_DEPRECATED 2022-10-19 20:31:53 +02:00
Armin Novak
1c8bcbeb6a Added deprecation warnings to /cert-* options 2022-10-19 20:31:53 +02:00
Armin Novak
d357fa3237 Added a unified /tls: option
There are too many tls settings scattered over multiple different
switches. Add a unified option and deprecate the old ones
2022-10-19 20:31:53 +02:00
fifthdegree
eb04eb0008 Support using smartcard for gateway authentication 2022-10-19 18:55:38 +02:00
fifthdegree
e847f159a6 Try to use the smartcard key name Windows uses
Windows expects the containerName field in TSSmartCardCreds to be what
it would use for a smartcard key's name. Try to accomodate that (at
least for PIV and GIDS cards).
2022-10-19 18:55:38 +02:00
fifthdegree
9d0beaccae smartcardlogon: choose a single smartcard to use
Require a single smartcard certificate to be chosen and define a
callback to choose when more than one is available.
2022-10-19 18:55:38 +02:00
Marc-André Moreau
e3594c91dc Add UserSpecifiedServerName setting, /server-name command-line parameter 2022-10-14 17:59:57 -04:00
Armin Novak
be9cc98c08 Refactored cmdline common
* Add settings setter where possible
* Load dynamic sound channel alongside static one
* Load clipboard channel if requested
2022-10-13 14:48:40 +02:00
akallabeth
b58dd122b2 Disable functions that require WITH_CHANNEL if not defined 2022-10-13 14:38:06 +02:00
akallabeth
a38d584bf1 Do not compile client functions for encomsp if channel deactivated 2022-10-13 12:12:24 +02:00
David Fort
f76c14c256 fix smartcard logon with smartcard emulation
When smartcard emulation was enabled we were dumping the key and cert to
temporary files for PKINIT call, but they were deleted before we have
actually done the PKINIT. This patch fixes it.

It also add debug statement for the listing of smartcard keys / certs.

This also fixes the listing of smartcard on certain windows configurations
were we have to force NCRYPT_SILENT when doing a NCryptOpenKey.
2022-10-13 12:03:58 +02:00
Marc-André Moreau
27a865af74 Add Negotiate SSPI authentication module filtering 2022-10-12 22:07:45 +02:00
akallabeth
60720e7706 Improved streamdump file format 2022-10-07 10:38:03 +02:00
akallabeth
ed0f258423 Use GFX small cache by default
RAILS does have some problems if this is not enabled and there is
no real benefit for not setting it, so default it
2022-10-06 16:20:47 +02:00
David Fort
3947294ffb Adjust smartcard listing
When no CSP is provided, we were listing smartcard materials by querying the
MS_SCARD_PROV_A CSP, unfortunately on some windows hosts, the smartcards aren't
listed in that CSP. So this patch does the key listing by browsing all CSPs
instead of just a default one. You can still force a CSP and you'll get keys only
from this one.

This patch also address cases where the certificate on the smartcard doesn't
have a UPN attribute, if that happen we try to get a UPN from the email address.
2022-10-06 16:06:35 +02:00
Marc-André Moreau
cd6fcaacb4 use kerberos command-line suboptions for KDC URL 2022-09-30 19:33:12 +02:00
Marc-André Moreau
21d28ab62d add --kdc-url command-line parameter 2022-09-30 19:33:12 +02:00
akallabeth
1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
akallabeth
b18ca128c8
Fixed missing encomsp check (#8238)
The channel might not have been initialized and the pointer NULL
2022-09-22 10:27:52 +02:00
David Fort
e266784b24 client: fix channel loading for rdp2tcp
The RDP2Tcp channel has no associated bool in settings for configuring the loading
of the channel (only settings->RDP2TCPArgs for the args), so let's load it outside
of the big loading loop (prevent a warning for unknown bool setting 1519).
2022-09-21 16:04:02 +02:00
Simon Nivault
82b58325a3 Add switch to declare printer as default or not 2022-09-20 13:25:05 +02:00
garbb
940317282c remember participantId for use with assistance set control request 2022-09-19 09:41:45 +02:00
garbb
488b52405a change to c style comment 2022-09-15 10:25:35 +02:00
garbb
0413dfe7df if /auto-request-control, only request control once upon connect
if auto-request-control setting is enabled then only request control once upon connect, otherwise it will auto request control again every time server turns off control which is a bit annoying.
2022-09-15 10:25:35 +02:00
David Fort
1905524442
Channel loading (#8204)
* update .gitignore and cleanup conditionnal callback call

* client: rework channel loading

Automate the loading of channels that only depend on a given enabled setting.
2022-09-14 13:53:27 +02:00
Armin Novak
707b9348ee Unify encomsp request control code 2022-09-13 09:22:41 +02:00
liuyuh007
95b4d3cd3d
Update cmdline.c (#8140)
ipv6 port parse error
2022-08-19 13:43:44 +02:00
David Fort
942273e9cb
tls: add an option to dump tls secrets for wireshark decoding (#8120)
This new option /tls-secret-file:<file> allows to dump TLS secrets in a file with
the SSLKEYLOGFILE format. So this way you can setup the TLS dissector of wireshark
(Pre-Master-Secret log filename) and see the traffic in clear in wireshark.
It also add some more PFS ciphers to remove for netmon captures.
2022-08-16 10:40:32 +02:00
David Véron
a3712521a8 TLS version control
* added settings for minimal and maximal TLS versions supported
* refactorisation of the force TLSv1.2 setting
2022-07-07 07:13:11 +00:00
akallabeth
cb96e6143d Fixed -Wshadow warnings 2022-06-30 10:49:02 +02:00
akallabeth
ebf5de1d1d Preset LoadChannels function pointer 2022-06-29 09:18:53 +02:00
akallabeth
ce2e3ab0c7 Add better explanation of FreeRDP_EnforceTLSv1_2 2022-06-23 09:18:37 +02:00
Siva Gudivada
7ce4d8b196 add a new flag to enforce tls1.2 2022-06-23 09:18:37 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
650a275ceb Added new client callback LoadChannels and freerdp_client_load_channels
Split channel loading from PreConnect as it might be necessary to
reinitialize channels on redirect
2022-06-23 07:45:55 +02:00
akallabeth
f25261e271 Unifiy string append functions 2022-06-17 08:41:46 +02:00
Marc-André Moreau
161617c4a4 Implement RDP persistent bitmap cache 2022-06-08 23:37:06 +02:00
Marc-André Moreau
1d5c0be5ec Add settings to load a custom SSPI shared library module 2022-06-01 15:16:12 +02:00
David Fort
4ffd3e84b9 smartcard: take in account pkcs11-module in smartcard listing and print pkcs11 errors 2022-05-06 13:39:26 +02:00
akallabeth
575dbf523f Fixed uninitialized DeviceArray 2022-05-01 11:42:55 +02:00
akallabeth
6fd71fe737 Eliminate Dead nested assignment warnings 2022-04-28 12:37:19 +02:00
akallabeth
ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth
1dcc5a180a Fixed warnings 2022-04-28 11:24:51 +02:00
akallabeth
cc3e28f2f1 Fixed -Wdocumentation errors 2022-04-28 11:24:51 +02:00
Armin Novak
ad20e431cc Fix #7834: Check if optional argument value is present 2022-04-27 18:00:32 +02:00
Armin Novak
9036b83e87 Fixed setting GatewayHostname 2022-04-20 15:24:45 +02:00
akallabeth
f99491c354
Fixed /gt:xxx settings (#7808)
* Disable websocket support with RPC
* Use settings getter/setter
2022-04-19 14:47:57 +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
Adrian Vollmer
1adb263813 Updated doc regarding proxy URL syntax 2022-04-05 09:22:48 +02:00
Adrian Vollmer
a19de01fe3 Applied requested changes
* Add `proxy_utils.h`
* Move `proxy_parse_uri()` back to `proxy.c`
* Copy function `value_to_int` to `proxy.c`
* Remove memory leak (`uri_copy`)
2022-04-05 09:22:48 +02:00
Adrian Vollmer
28923ddd75 Fixed parsing of https_proxy environment variable
A proxy URI was parsed both in the function `proxy_read_environment()` in
`libfreerdp/core/proxy.c` and in the function
`freerdp_client_settings_parse_command_line_arguments()` in
`client/common/cmdline.c`. But only the latter was taking into account
that the URI can contain a user and password, which made it impossible
to use a proxy with authentication by just using an environment
variable like `https_proxy`.

The function `proxy_parse_uri()` in `libfreerdp/core/proxy.c` was
clearly not parsing the optional username and password.

This commit moves the code from `client/common/cmdline.c` to
`libfreerdp/common/settings.c` into a function `proxy_parse_uri()` so
redundant code is avoided. This function is then called in both
instances where a proxy URI is parsed.

Some minor adjustment were made to the code, so the `WLog_INFO()`
statement at the end works in both cases, where credentials were either
provided or not. Also, some error messages were added or clarified.

If the parsing of the environment variable fails, we ignore it entirely
(with a warning) and proceed.
2022-04-05 09:22:48 +02:00
akallabeth
d22ef1786b Proper use of rdpSettings in client
* Use getter/setter
* Fix uninitialized uses
2022-03-28 15:52:32 +02:00
akallabeth
14568872a9
Instance cleanup (#7738)
* Cleaned up freerdp::autodetect

* Deprecate freerdp::input

* Deprecated freerdp::update

* Deprecated freerdp::settings

* Deprecated freerdp::autodetect

* Removed rdpTransport::settings

* Deprecated freerdp_per::update|settings|autodetect

* Fixed mac client and server compilation

* Fixed windows compilation

* Added deprecation warnings

* Fixed initialization of structs.

* Fixed android build

* Fixed freerdp_client_context_new const correctness

* Fixed checks for android implementation

Replaced checks with assertions where appropriate

* Fixed checks for windows client

Replaced checks with assertions where appropriate

* Fixed proxy client pointer dereference
2022-03-23 13:18:35 +01:00
akallabeth
fa59c4b705 Fixed compile warnings 2022-03-18 07:50:54 +01:00
Martin Fleisz
5b9290fc6c client: Fix error when compiling with WITH_CHANNELS=OFF 2022-03-16 14:47:41 +01:00
akallabeth
704289ffee
Smartcard tls logon fix (#7709)
* Early return authenticate if TLS smartcard logon

* Removed obsolete SmartcardPin and unified AuthenticateEx calls

* Remove password-is-pin from command line

The setting is implied by smartcard-logon and only of interest in
server side code, so the setting is useless

* Rework AUTH_SMARTCARD_PIN

Just prompt for PIN and not user/domain if this is requested.

* Fixed a memory leak in nla.c

* Align credentail prompt

* Handle AUTH_NLA & smartcard, just ask for PIN

* Added assertions, removed duplicate password prompt check

* Move smartcard logon after credential prompt
2022-03-09 09:09:53 +01:00
Armin Novak
71aac852d6 Remove async-input from clients 2022-03-08 15:37:19 +01:00
Armin Novak
25e8a362b1 Abort autoreconnect if a user cancel action was triggered. 2022-03-07 15:13:34 +01:00
akallabeth
3d38d2636c Decreased logging verbosity for INFO level 2022-03-04 09:34:02 +01:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak
7b65677b65 Improved command line help printing 2022-02-24 14:48:46 +01:00
David Fort
34c5b65064 Move some options to /kerberos block 2022-02-24 08:52:25 +01:00
Armin Novak
8ff70baf53 Const correct parseSubOptions
* Function static
* Arguments const where applicable
2022-02-24 08:52:25 +01:00
Armin Novak
150674f341 Moved headers to appropriate places 2022-02-24 08:52:25 +01:00
David Fort
0435b5a65d Implement smartcard logon 2022-02-24 08:52:25 +01:00
Armin Novak
b3790d7454 Removed Smartcard files from settings
* Removed file names from settings
* Added temporary file creation for pkinit
2022-02-24 08:52:25 +01:00
Armin Novak
649527ef8d Fixed const correctness of freerdp_smartcard_list 2022-02-24 08:52:25 +01:00
Armin Novak
b46d74806e Removed FreeRDP_ListSmartcards setting
* Directly print smartcard list without intermediate setting
* Centralize the help text, clients do not need to add extra code
2022-02-24 08:52:25 +01:00
David Fort
44c82cd929 Fixes various akallabeth remarks 2022-02-24 08:52:25 +01:00
Armin Novak
a00238d253 Use freerdp_settings_set and _strdup 2022-02-24 08:52:25 +01:00
David Fort
cb351a099d Enable smartcard NLA logon 2022-02-24 08:52:25 +01:00
David Fort
62ac25ef54 smartcard_emu: enable to specify the smartcard pin 2022-02-24 08:52:25 +01:00
Armin Novak
538b34c51d Moved rail application start to client common 2022-02-22 16:43:21 +01:00
Armin Novak
0c7e6c3c2d Refactored disp channel
* Assert all input parameters
* Use DISP_CHANNEL_NAME define for channel name
2022-02-22 11:29:56 +01:00
Armin Novak
f03059e718 Extended AINPUT API:
* Each event now has a timestamp
* Relative and absolute events are sent simultaneously
* Added a flag indicating relative events are available
2022-02-22 09:44:13 +01:00
akallabeth
e5592772ce Check return of ainput mouse event 2022-02-22 09:44:13 +01:00
akallabeth
d3ee52b0f8 Fix conversion of mous wheel valuet 2022-02-22 09:44:13 +01:00
akallabeth
855c9d3f4c Fixed broken format string 2022-02-22 09:44:13 +01:00
akallabeth
de81f54076 Add relative mouse input and no channel support 2022-02-22 09:44:13 +01:00
akallabeth
8a5bd522c7 Fixed scaling of discrete wheel input. 2022-02-22 09:44:13 +01:00
akallabeth
4d3157c9cc Added common client mouse event functions 2022-02-22 09:44:13 +01:00
akallabeth
4ca5078027 Added common client channel handling 2022-02-22 09:44:13 +01:00
Armin Novak
b85333bb9e Automatically load advanced input channel 2022-02-22 09:44:13 +01:00
akallabeth
cdbfff87ea Unified client stop 2022-02-22 09:44:13 +01:00
Armin Novak
da9edc1829 Added mouse-relative option to command line 2022-02-22 09:44:13 +01:00
Armin Novak
cefb4e1237 Use freerdp_settings_set and _strdup 2022-02-02 13:43:31 +00:00
Armin Novak
3303aa1446 Fixed format string 2022-02-02 07:57:56 +00:00
Armin Novak
b02995fc0b Fixed missing public linking for freerdp-client 2022-02-01 11:04:32 +00:00
Armin Novak
ca30e749e9 Fixed unused-but-set-variable and reserved identifier warnings 2022-02-01 08:48:21 +01:00
Armin Novak
aa3f3ea95f Fixed const warnings 2022-01-31 16:13:06 +01:00
Marek Vasut
bda2421c57 cmdline: Always reinitialize NetworkAutoDetect
Always reinitialize NetworkAutoDetect, otherwise it might end set to
previous value and not the desired one. This happens when the client
sets /network:lan , in which case NetworkAutoDetect remains set to
TRUE because freerdp_set_connection_type() was previously called in
prepare_default_settings() and NetworkAutoDetect is never updated by
freerdp_set_connection_type() afterward.

Signed-off-by: Marek Vasut <marex@denx.de>
2022-01-23 10:47:29 +01:00
Armin Novak
1fedd36f65 Fixed proxy compilation issues after rdpUpdate refactoring 2022-01-18 11:24:23 +01:00
akallabeth
803dd8f6ff Added options for certificate file based smartcard logon 2022-01-11 12:34:43 +01:00
Armin Novak
a0fa7307bd Removed unused variable 2021-12-20 08:11:00 +01:00
Armin Novak
7d80c74e97 Cleaned up RDPDR channel interhitance
* All channels inheriting from RDPDR_DRIVE base struct
* Add functions to create/free a new device of a type
* Fixed settings array resize code, prevent 0 sizes
2021-10-18 09:21:02 +02:00
akallabeth
c627e2196f Improved warning for removed legacy command line 2021-10-15 14:53:39 +02:00
Armin Novak
73fbbcf0fb Fixed const warnings 2021-10-14 13:04:59 +02:00
Armin Novak
9444dab58a Renamed global argument struct 2021-10-14 13:04:59 +02:00
Armin Novak
f8bf4b0009 Fixed const correctness of command line functions 2021-10-14 13:04:59 +02:00
Armin Novak
0816d32823 Fixed varialbe integer type warning 2021-10-14 13:04:59 +02:00
akallabeth
98977336fd
Drop legacy command line (#7348) 2021-10-14 08:25:46 +02:00
akallabeth
22484ee495 Fixed missing NULL check in mappedGeometryUnref 2021-10-14 08:21:15 +02:00
akallabeth
6c58e821dd
Do not write usbdevicestoredirect if the string is NULL (#7347) 2021-10-12 11:04:09 +02:00
akallabeth
6ac4cad8dd
Settings fixes (#7335)
* Fix temporary settings allocation for command line

Detection of legacy command line requires a temporary settings
struct. This was previously manyally allocated instead of using
freerdp_settings_new and freerdp_settings_free.

* Fixed CommandLineParseCommaSeparatedValuesEx

The name argument was not copied into the returned array.
2021-10-07 13:43:12 +02:00
akallabeth
03a9ca80c8
Refactor proxy (#7312)
* Added hidden transport dump and replay options

* Added settings to enable transport dump and replay
* Added check in freerdp_connect to skip authentication on
  dump replay

* Fixed proxy issues

* Proper shutdown handling
* Uninitialized variables
* Skip proxy-client channels, initialize from peer channels and
  config
* Filter static channels like dynamic ones
* Added proxy module filtering from config data (channels, input, ...)

* Removed oboslete proxy decoding related files

* Added defines for RDPECAM channel

* Added proxy config options:

* VideoRedirection
* CameraRedirection

* Fixed duplicate channel free
2021-09-23 14:52:03 +02:00
akallabeth
e0a531f728
Channel fixes (#7309)
* Added missing CHANNEL_NAME defines.

* Fixed FreeRDP_ChannelDefArray setter

* Fixed code duplication due to merge error

* Added public function freerdp_channels_from_mcs

* Fixed const correctness in mcs
2021-09-22 14:27:21 +02:00
akallabeth
1c84690c2f
Fixes from tests (#7308)
* Fixed memory leak in tls_verify_certificate

* Fixed missing NULL checks

* Fixed missing checks for FreeRDP_DeactivateClientDecoding

* Added WINPR_ASSERT for client common new/free

* Added /disable-output switch to deactivate client decoding

Allows low resource remote connections that do not require visual
feedback. (e.g. load testing/...)
2021-09-21 09:56:56 +02:00
akallabeth
41aaafef77 Added unicode input for xfreerdp 2021-09-17 07:21:45 +02:00
akallabeth
70894c92e7 Added /kbd-scancode-list
Prints a listing of hexadecimal scancodes and the mapping to VK_*
2021-09-10 15:47:08 +02:00
Armin Novak
b336751861 Fixed AuthenticateEx issues 2021-09-09 08:53:20 +02:00
Armin Novak
0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
Armin Novak
d3168a1436 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.
2021-09-04 18:01:30 +02:00
Armin Novak
413dcd3c28 Fixed RDPSND_CHANNEL_NAME
RDPSND channel is special, as it has many names.
(e.g. static channel, dynamic channel and UDP one.
Use RDPSND_CHANNEL_NAME to identify the module name instad of
RDPSND_DVC_CHANNEL_NAME
2021-08-25 13:40:47 +02:00
Armin Novak
054f0ea260 Use defines instad of channel names 2021-08-25 10:54:24 +02:00
Armin Novak
f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Armin Novak
b7d612d843 Remove variable shadowing 2021-08-02 10:28:06 +02:00
Armin Novak
610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak
0fc21f51f5 Fixed #7200: /bpp parsing fixed 2021-07-29 18:29:16 +02:00
Armin Novak
7c14196000 Added log message for invalid DrivesToRedirect data 2021-07-29 15:09:53 +02:00
akallabeth
5a85a824d2 Used settings getter/setter for NSCodec 2021-07-01 11:56:17 +02:00
akallabeth
534d30beb3
No deprecated (#7107)
* Removed cmake options disabling compiler warnings

* Added deprecation compile options

* Fixed android client use of deprecated symbols

* Removed obsolete callback
2021-06-22 14:39:10 +02:00
Armin Novak
8ef57bf296 Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
akallabeth
b453d5e40e Fixed rdtk, uwac and winpr standalone builds 2021-06-22 08:54:18 +02:00
Armin Novak
390e329807 client: Fixed warnings 2021-06-18 11:32:16 +02:00
Armin Novak
5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak
1e714df24e Renamed macros to avoid windows issues 2021-06-16 11:46:42 +02:00
Armin Novak
d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Martin Fleisz
be1a1dcbe0 client: Fix writing of untouched rdp settings to rdp files
Since the last change untouched string settings were written to the rdp
file because their default value was set to NULL instead of ~0. This
resulted in settings being written to the rdp file with a value of
"(null)" instead of just being skipped.
2021-06-02 12:57:31 +02:00
akallabeth
6b36c6d417
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.
2021-05-31 11:42:03 +02:00
Biswapriyo Nath
37bbf9d218 CMake: Install DLLs in bin folder.
In Win32 platform, executables and runtime libraries need to be in one folder.
2021-05-25 09:41:44 +02:00
Armin Novak
6f2c6625e4 Added FREERDP/WINPR prefix to define GIT_REVISION 2021-05-18 13:37:34 +02:00
Armin Novak
2b19576fc7 Fixed compiler warnings, function arguments and const parameter 2021-05-18 13:37:34 +02:00
akallabeth
566f47f63b Fixed compilation warnings. 2021-05-11 08:32:18 +02:00
akallabeth
b494a193db Refactored certificate API:
* Proper encapsulation
* known_hosts2 backend extended (storing PEM)
* New backend storing each host certificate in a file
2021-05-11 08:00:18 +02:00
akallabeth
ab49694101 Added new RDP file options 2021-05-11 07:59:05 +02:00
akallabeth
d4ae65dbb5 Added version to client log, removed build_date 2021-04-22 14:07:37 +02:00
akallabeth
ef6e4c0570
ADDIN_ARGV cleanup, added camera setting to RDP parser (#6947)
* Added camerastoredirect to RDP parser

* Refactored ADDIN_ARGV handling

* Added ADDIN_ARGV unit tests
2021-04-12 10:38:40 +02:00
akallabeth
1d24cec7f0 Use specific names for drive hotplug special values 2021-03-09 13:58:28 +01:00
Armin Novak
5fc2290c03 Added option to disable gateway websocket support 2021-03-08 14:33:05 +01:00
Denis
b3a2042103 Add support for OpenBSD sndio 2021-03-08 13:11:50 +01:00
Fabio Fantoni
5c408e080e Minor typo fix
From debian packages patch done by Mike Gabriel
<mike.gabriel@das-netzwerkteam.de>
2021-02-14 18:35:42 +01:00
Marc-André Moreau
4e14e7d41e freerdp-client: don't enable vmconnect mode based on PCB field presence in .RDP file 2021-02-11 15:05:53 -05:00
Martin Fleisz
21158c0e8b
Merge pull request #6537 from akallabeth/kbd_remap
Added option to remap scancodes
2021-02-05 09:31:45 +01:00
Ondrej Holy
d7566f5f5a
client: Fix exit codes for /help and similar option (#6741)
* client: Fix exit codes for /help and similar option

Currently, non-zero exit code is returned for /version, /buildconfig, /help,
/monitor-list, /kbd-list and /kbd-lang-list command-line options for several
clients. This is against conventions because 0 is usually returned in
such cases. Also, there is potentially another problem that the returned
codes overflow on UNIX systems (where the exit code is a number between 0
and 255). Let's fix the clients to return 0 in the mentioned cases to honor
conventions and 1 for the command-line parsing errors (or -1 for clients
who already use that value).

Fixes: https://github.com/FreeRDP/FreeRDP/issues/6686

* Refactored freerdp_client_settings_command_line_status_print_ex

Now returns 0 if help or version information was requested.

* Do not eliminate original error status.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2021-01-22 09:44:55 +01:00
akallabeth
c865c4eb64 Added support for file:// urls for rdp files 2020-12-23 12:29:37 +01:00
akallabeth
9b8d16b332 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.
2020-11-27 09:10:41 +01:00
bolt
03ced3d8f0 Add support for -grab-mouse, to prevent the client from moving the user's pointer 2020-11-20 09:40:00 +01:00
Simon Tatham
1dc8198803 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.
2020-11-20 08:34:20 +01:00
akallabeth
f032be12d2 Fixed printf format 2020-11-17 08:53:42 +01:00
Martin Fleisz
f3591485bd client/common: Always set gatewayprofileusagemethod to 1
mstsc will only load our gateway settings if gatewayprofileusagemethod
is set to 1. Otherwise it will always set the option "Auto-detect RD
Gateway server settings" and ignore the other gateway settings in the
rdp file.
2020-11-13 11:44:19 +01:00
Martin Fleisz
60317154a3 client/common: Several fixes for the rdp file parser
This PR fixes various issues in the rdp file parser:
- NetworkAutoDetect was written inverted
- GatewayHostname was missing the port info (if not default)
- Several settings were left out when populating the file struct
2020-11-12 18:13:12 +01:00
Armin Novak
d7bf6553c5 Added option to remap scancodes 2020-10-29 18:44:32 +01:00
Martin Fleisz
0f70aa2f43
Merge pull request #6415 from akallabeth/proxy_settings_api
Use freerdp_settings_[s|g]et* api to access proxy vaiables.
2020-08-05 11:47:05 +02:00
akallabeth
44ea09e7ad Use freerdp_settings_[s|g]et* api to access proxy vaiables.
Fixes #6414
2020-08-05 11:29:00 +02:00
Martin Fleisz
d87d351c00 Add GatewayMessageType to public API 2020-08-04 15:58:48 +02:00
Martin Fleisz
3753f0ea9c Implement gateway message callback for Windows, Wayland and X11 clients 2020-08-04 15:58:48 +02:00
Bernhard Miklautz
1628939227 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
2020-06-17 12:59:41 +02:00
Kobi
0cb7ada6de
Merge pull request #6208 from akallabeth/accept_cert_io
Read newline from stdio on certificate accept
2020-05-25 13:25:39 +03:00
akallabeth
81765e71f3 Fixed BehaviourSanitizer warning in rdp parser 2020-05-20 15:10:07 +02:00
akallabeth
5b842bc7a7 Read newline from stdio on certificate accept 2020-05-20 11:57:01 +02:00
akallabeth
7890833af8 Replaced strtok with strtok_s 2020-05-18 11:39:22 +02:00
Martin Fleisz
953fc03031
Merge pull request #6138 from akallabeth/rdp_file_message_fix
Fixed warning messages for RDP file options
2020-05-05 12:21:15 +02:00
akallabeth
5f5bf10703 Fixed warning messages for RDP file options
networkautodetect and bandwidthautodetect are both boolean options
which must match each other. Added adequate warnings.
2020-05-05 10:43:33 +02:00
David Fort
5b98aa7515
Merge pull request #6063 from akallabeth/expert_settings
Added expert settings /tune and /tune-list
2020-05-04 12:09:39 +02:00
Lukas Fink
060253c9fa 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-04-26 19:09:13 +02:00
akallabeth
b094d52d0b 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-22 18:14:39 +02:00
akallabeth
0a86090ff1 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-22 11:10:56 +02:00
Armin Novak
58be47bc63 Added expert settings /tune and /tune-list 2020-04-21 17:30:24 +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
David Fort
245fc6014d
Merge pull request #5830 from akallabeth/smartcard_updates
Smartcard updates
2020-02-07 14:11:00 +01:00
Armin Novak
ddcc5ae768 Fixed copy of opaque data
do not use strcncpy for opaque data.
2020-01-23 10:12:12 +01:00
Armin Novak
5a51f97ce0 Added NULL checks to silence clang-scanbuild. 2020-01-23 10:12:12 +01:00
Armin Novak
2cb022a922 Fixed NULL dereference. 2020-01-23 10:12:12 +01:00
Martin Fleisz
baca062321 core: Fix and extend populate rdp file from settings
This PR contains the following changes:
- Get rid of unused SettingsModified array (kept in the settings struct for ABI
compatibility)
- Fix and extend freerdp_client_populate_rdp_file_form_settings (wrote <null> strings to the rdp file, missed a lot of settings)
- Set KeyboardHook default value to 2 (hook in fullscreen) just as mstsc
does
2020-01-22 14:18:30 +01:00
Kobi Mizrachi
8c5d96784d cmdline: export CommandLineParseCommaSeparatedValues 2020-01-22 14:18:21 +01:00
Martin Fleisz
263d74ee29
Merge pull request #5783 from akallabeth/gfx_mask_arg
Added /gfx and /gfx-h264 option mask=<value>
2020-01-16 10:02:15 +01:00
David Fort
30d6e25def
Merge pull request #5750 from akallabeth/encomsp_auto
Encomsp automatic input control && cleanups
2020-01-15 13:56:00 +01:00
David Fort
0cc3af2282
Merge pull request #5796 from akallabeth/rdp_10_7_large_pointers
Added RDP 10.7 large pointer support
2020-01-14 10:17:13 +01:00