Commit Graph

16463 Commits

Author SHA1 Message Date
Armin Novak
9218a404b5 [client,x11] force initial format list 2022-12-03 10:53:18 +01:00
Armin Novak
cfe09892be [channel,cliprdr] log debug information
Log cliprdr debug information without compile flags
2022-12-03 10:53:18 +01:00
Armin Novak
f721be5023 Fix #8483: typo in CMake variable name 2022-12-03 00:13:51 +01:00
Armin Novak
358ac53b66 [core,license] print a warning on invalid packet
* add stringify function for securityFlags
* print a error message on unexpected packet
2022-12-03 00:13:27 +01:00
David Fort
7041517ed6 proxy: prepare intercept mode for dynamic channels
This patch introduce the basic architecture to intercept content of dynamic
channel. When a dynamic channel is in intercept mode, we accumulate and reassemble
the current packet so that it can be passed for inspection.
2022-12-02 22:08:10 +01:00
Armin Novak
ff266e9575 furter added settings documentation 2022-12-02 15:25:08 +01:00
akallabeth
d898f04e41 [core,settings] Added settings function docs
* Document settings functions
* Make rdpSettings* checks more uniform
2022-12-02 15:25:08 +01:00
Armin Novak
6f2250ff4a [core] improve finalize flag log messages 2022-12-02 15:08:34 +01:00
akallabeth
9ca34bc876 [winpr,sspi] fix memory leak in kerberos_InitializeSecurityContextA 2022-12-02 15:08:09 +01:00
akallabeth
4033698266 [core,credssp] Add additional checks
* Better state checks
* Improved log messages
* Assertions for debug builds
2022-12-02 15:08:09 +01:00
akallabeth
b0aef46caf [winpr,krb] fixed kerbeos context handling 2022-12-02 15:08:09 +01:00
akallabeth
c1a9c19308 [settings] Fixed UTF16 helpers
Do not copy the already allocated buffer
2022-12-02 15:08:09 +01:00
Armin Novak
e1eacad74c [scard] fixed memory leak
card_id_and_name_* return allocated values, free after use
2022-12-02 15:08:09 +01:00
Armin Novak
58bc1ee4c9 [smartcard] fix multi string conversion 2022-12-02 15:08:09 +01:00
Armin Novak
a57c480b29 [channel,rdpdr] proper queue cleanup for rdpdr 2022-12-02 15:08:09 +01:00
Armin Novak
bc3904ec65 [channel,smartcard] Fix message cleanup on shutdown 2022-12-02 15:08:09 +01:00
Armin Novak
dc077eed78 [utils] fix smartcard string list conversion 2022-12-02 15:08:09 +01:00
David Fort
bc8afa0ad5 ncrypt_pkcs11: fix buffer allocation for key name 2022-12-02 15:08:09 +01:00
Armin Novak
0091f72761 [winpr,smartcard] fix PCSC_SCardListReaders 2022-12-02 15:08:09 +01:00
akarl10
0623101b6a [rdg] fix FAILED detection and PAA string length 2022-12-01 16:36:38 +01:00
Armin Novak
97322c32ad [gateway] include '\0' in paa cookie string 2022-12-01 14:42:59 +01:00
Sergey Bronnikov
2ad1469612 Add fuzzer for certificate_data_set_pem()
Part of #6682
2022-11-30 20:06:21 +01:00
Sergey Bronnikov
249b4f80d0 Fix building fuzzers with disabled OSS_FUZZ 2022-11-30 20:06:21 +01:00
Armin Novak
41066ff36a [core,cert] improve argument checks
* Add input argument checks for exposed functions
* Assert internal function arguments
2022-11-30 13:06:07 +01:00
Armin Novak
31827485a8 [core,update] do not require EndPaint callback
Some RDP servers start sending graphics updates too early for us to
process. This triggered a bug that at that point the EndPaint callback
is not available, as the connection is not fully established.
2022-11-30 11:44:15 +01:00
David Fort
d59c0a49c3 proxy: fix channel shift between front and back
When some channels are filtered, some misalignement of channel ids could happen.
This patch keeps track of the back and front channel ids to correctly identify a
channel and send packets with the correct channel id.
2022-11-30 11:38:08 +01:00
David Fort
9db032f326 rdp: notify the Activate state as soon as it happens
Without the patch, we parse more packets and the calling code doesn't have the
opportunity to invoke PostConnect callback (make the connection not work in the proxy)
2022-11-30 08:41:22 +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
Armin Novak
ff2509bbc4 [core,client] relax sc flags state checks 2022-11-29 22:29:29 +01:00
Armin Novak
43571a3e34 [core,client] Added logging for finalize flags
Log an error if expected finalize flags did not match what we got.
2022-11-29 22:29:29 +01:00
Armin Novak
c2e8339c4b [packaging] fix debian rules
dh_install --fail-missing was replaced by dh_missing --fail-missing
2022-11-29 17:38:49 +01:00
Armin Novak
bbf893a5d8 [winpr,crt] fix unicode conversion functions
There are subtle differences between MultiByteToWideChar,
WideCharToMultibyte and the ICU equivalents
2022-11-29 15:42:10 +01:00
Armin Novak
0989722f05 [packaging] return true in dh_auto_test
We do not build the unit tests for nightly packages as that would change
the API, so always return true for test result
2022-11-28 21:32:35 +01:00
akallabeth
6014efc19b [winpr,smartcart] simplified casts 2022-11-28 10:42:36 +01:00
akallabeth
66dad5deae fixed review issues
* Overallocation in unicode functions
* Removed useless statements
* Fixed loop indices
2022-11-28 10:42:36 +01:00
Armin Novak
40b55466bf [client,windows] Fixed useless string conversion 2022-11-28 10:42:36 +01:00
akallabeth
7bf8b46726 [smartcard] Use multistring convertion functions 2022-11-28 10:42:36 +01:00
Armin Novak
2784d54d6f Deprecate MultiByteToWideChar and WideCharToMultiByte 2022-11-28 10:42:36 +01:00
Armin Novak
6f2d7f94cf Deprecate ConvertFromUnicode and ConvertToUnicode 2022-11-28 10:42:36 +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
2aefa9418d [winpr,stream] Added functions to read/write utf-8
* Stream_Write_UTF16_String_From_UTF8 writes a UTF-8 string to a
      stream in UTF-16 encoding
    * Stream_Read_UTF16_String_To_UTF8 reads a UTF-16 encoded string
      from the stream and returns it in UTF-8 encoding
2022-11-28 10:42:36 +01:00
akallabeth
2ac2f43503 [freerdp,settings] Add UTF16 helper functions
This new function allows get or set settings as WCHAR
string directly. Converts the string automatically from/to utf-8
internally
2022-11-28 10:42:36 +01:00
Armin Novak
0fb8c9e87e [winpr,crt] Added ConvertMszWCharNToUtf8* 2022-11-28 10:42:36 +01:00
akallabeth
4f7114a140 [winpr,crt] Added ConvertMszUtf8NToWChar*
A conversion function that can handle multistrings (e.g. each element is
'\0' delimited, termination is '\0\0')
2022-11-28 10:42:36 +01:00
akallabeth
5c91c30a18 [winpr,crt] Added new unicode conversion functions
* Added functions converting WCHAR to/from UTF-8 with given buffers
  and proper size_t arguments to have a centralized check for
  integer overflows on RDP deserialization
* Added allocating functions converting WCHAR to/from UTF-8 as
  convenience
2022-11-28 10:42:36 +01:00
akallabeth
5ae159303f [winpr,crt] Added unicode conversion backends
* Support apple with NSString
* Support android via JNI
* Split ICU to own file
2022-11-28 10:42:36 +01:00
akallabeth
00ee213f97 [winpr,android] Unify JNI_OnLoad
* Split JNI_OnLoad and JNI_OnUnload to own module to be usable from more
  than only timezone
* Explicitly call System.loadLibrary('winpr') (and other FreeRDP
  libraries) in android client as JNI_OnLoad is only triggered by that
  and not implicit loading
2022-11-28 10:42:36 +01:00
akallabeth
113290c35c [winpr,string] Use size_t arguments
* Use size_t arguments for ByteSwapUnicode, ConvertLineEndingToLF
  and ConvertLineEndingToCRLF
* Simplify code of line conversion functions
2022-11-28 10:42:36 +01:00
akallabeth
1304af4748 [core,rdp] Refactor rdp security encryption
Unify rc4 encryption key handling, use common free and reset functions
2022-11-25 12:35:14 +01:00
akallabeth
c8956513d6 [core,rdp] Add a check for broken RDP security
RDP security is rarely used nowadays, but there have been reports about
situations where the encryption key is missing.
Add this check to properly terminate the connection in case of such an
unexpected event.
2022-11-25 12:35:14 +01:00