Commit Graph

16290 Commits

Author SHA1 Message Date
Martin Fleisz
b5e8b419b8 drive: Fix an issue when redirecting drives on Windows
CreateFile/GetFileInformationByHandle will fail if used with just a
drive letter i.e. C:/.

This PR fixes that case by using GetFileAttributesExW as a fallback in
case CreateFileW fails.
2022-11-03 15:02:27 +01:00
Martin Fleisz
fbbcd9b8ef nla: Fix unicode issues with gateway code
Gateway code was passing a char string as the package name to
`credssp_auth_init`. When using Unicode builds this fails since
`QuerySecurityPackageInfo` expects a wchar string.

Additionally with unicode builds, `credssp_auth_pkg_name` causes string
type mismatches in the gateway code where a char string is expected.
2022-11-03 15:01:39 +01:00
Armin Novak
b04c0e7b1c Fix const warnings in ffmpeg h264 module 2022-11-03 11:58:17 +01:00
Armin Novak
71b568ac30 Relax transport checks, allow invalid socket
When no real RDP connection is in use, the SSL socket might be invalid.
Do not assert here but allow the parsing to continue
2022-11-03 11:58:17 +01:00
Armin Novak
b4dbdac68b Refactored multitransport
* Implemented server and client multitransport message parsing
2022-11-03 11:58:17 +01:00
Armin Novak
72f7382f2f Added input assertions 2022-11-03 11:58:17 +01:00
Armin Novak
78a1399eb9 Improve logging in autodetect 2022-11-03 11:56:12 +01:00
Armin Novak
85ce3388d7 Handle RDP_NETCHAR_SYNC_RESPONSE_TYPE 2022-11-03 11:56:12 +01:00
akallabeth
016d2fe689 Renamed rdp_recv_server_synchronize_pdu 2022-11-03 11:56:12 +01:00
akallabeth
108b8a47ba Refactored autodetect code
* Added assertions
* Eliminated warnings
* Eliminated unnecessary allocations
2022-11-03 11:56:12 +01:00
Armin Novak
48a6c0b815 Unified stream length checks
* Added new function to check for lenght and log
* Replace all usages with this new function
2022-11-03 11:56:12 +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
akallabeth
c0193a1813 Fixed #8259: in remote app mode keep the keyboard state
If the mouse enters/leaves the window or the window is unmapped in
desktop session mode we can reset the keyboard modifiers state
while in remote app mode these events have different meaning. Be
more strict in the latter case and only reset on focus out
2022-11-03 11:01:30 +01:00
Armin Novak
843680e543 Clipboard syntesizer replaces path separators
The clipboard expects windows style paths, so replace all / with \
2022-10-28 08:22:43 +02:00
Armin Novak
f9faf3d3d5 Unified synthetic file cleanup 2022-10-28 08:22:43 +02:00
Armin Novak
a7a8e7ee8d Fixed read/write of filedescriptorw times 2022-10-28 08:22:43 +02:00
Armin Novak
096e98d8b5 Moved verbose log message
Do not log expected abort conditions
2022-10-28 08:22:43 +02: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
akallabeth
58599c91a3 Add setting name for invalid function access
Try to be helpful and resolve the settings index with a readable
name if possible to help diagnose wrong function use
2022-10-27 10:46:58 +02:00
Armin Novak
dbb1889a54 Removed unused BipBuffer 2022-10-27 10:39:25 +02:00
Armin Novak
f1ae9be54d Fixed nla error code to string conversion 2022-10-27 10:37:23 +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
Armin Novak
4ea4f5e936 Fixed compile error for old openssl 2022-10-27 10:03:32 +02:00
Armin Novak
cfffc5ef2c Do not terminate if error info is received. 2022-10-27 09:14:28 +02:00
akallabeth
a29343251c Fixed invalid pointer in freerdp_connect
After rdp_client_connect the settings pointer might have changed.
Reset it from the rdpContext.
2022-10-27 09:03:54 +02:00
akallabeth
1e67db7c08 Do blockwise write, use winpr_DeleteFile 2022-10-25 13:58:05 +02:00
akallabeth
1c0908bdfb Use winpr_DeleteFile and winpr_MoveFileEx 2022-10-25 13:58:05 +02:00
akallabeth
22dce52d15 Add function winpr_MoveFileEx 2022-10-25 13:58:05 +02:00
akallabeth
6e7b91c5ad Fixed smartcard logon file leak
The certificate and private key temporary files have not been
cleaned up under certain error conditions.
2022-10-25 13:58:05 +02:00
akallabeth
a8650d9a3d Fix certificate and private key checks for smartcard logon 2022-10-25 13:58:05 +02:00
fifthdegree
cbd310df52 Check smartcard certificates for correct EKU
To be used for login, smartcard certificates must have the Microsoft
Smart Card Logon EKU
2022-10-24 22:22:00 +02:00
fifthdegree
78ba60f50f Check for NULL pointer in winpr_Digest_Free 2022-10-24 08:33:57 +02:00
akallabeth
68ad8d5a1c Added missing return in winpr_Digest_New 2022-10-20 19:24:41 +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
2a181c19c5 Added missing include 2022-10-19 20:33:17 +02:00
Armin Novak
a66d9d1706 Improve OpenSSL provider loading
* Added log messages for failure to load a provider
* Add code to clean up loaded providers on shutdown
2022-10-19 20:33:17 +02:00
Armin Novak
6ab2cb6d99 Fixed mutially exclusive CAIRO and SWSCALE includes
When both are defined there was a build error due to missing
includes.
2022-10-19 20:31:53 +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