Commit Graph

15139 Commits

Author SHA1 Message Date
akallabeth ad86192ac6 Fixed TestConnect
* Due to a typo (and missing argument checks in sample-server) the
  command line for the test was invalid.
2021-09-06 10:11:14 +02:00
akallabeth af8d1e5690 Updated settings
* Generator script now WINPR_ASSERT if invalid arguments are
  supplied
* Updated settings with new generated getter/setter
2021-09-06 10:11:14 +02:00
akallabeth 83104fda9c Updated sample-server
* Refactored code to remove global static variables
* Added better error checks and WINPR_ASSERT
2021-09-06 10:11:14 +02:00
akallabeth df3d58bab3 Fixed rdp_set_io_callbacks
* Cache transport default callbacks in rdp_new
* Cache and update transport callbacks in rdp_set_io_callbacks
2021-09-06 10:11:14 +02:00
akallabeth 00ac11524e Wrapped rpdRdp:state access in getter/setter
* Only access state via getter/setter
* Better state debuggind with log messages on state transition
2021-09-06 10:11:14 +02:00
akallabeth 595a40a1e0 Transport add getter, add checks
* Added transport_get_context to get rdpContext in IO callbacks.
* Added WINPR_ASSERT where possible.
* Fixed handle count mismatch in transport_get_event_handles
2021-09-06 10:11:14 +02:00
akallabeth 732a4d3839 Ignore NULL pointer as rdpsnd_server_context_free argument 2021-09-06 10:11:14 +02:00
Armin Novak 7e7394d905 Update default android build config
Remove x86 and x86_64 to bring down pr build times
2021-09-04 18:01:30 +02:00
Armin Novak 3170f4cfd4 Update TestConnect to generate certificates
After removing the default certificates from the repo now generate
temporary ones for TestConnect
2021-09-04 18:01:30 +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 50e9d3adf9 Implemented new AuthenticateEx callbacks. 2021-09-04 18:01:30 +02:00
Armin Novak bc9ef8327e Fixed #5382: Remove checked in test certificates
The sample servers did have checked in test certificates.
Remove them and let the user generate them when required.
2021-09-04 18:01:30 +02:00
Armin Novak fbae9ba88c Added LoadLibraryX and LoadLibraryExX
These functions take a UTF8 string and load a library with
LoadLibraryW under windows.
2021-09-03 08:29:15 +02:00
akallabeth a485306c9e
Moved global static variables to context (#7264)
xfreerdp and wlfreerdp used global static variables for multitouch input. Use fields in client context instead.
2021-09-01 09:44:11 +02:00
Armin Novak 737f5a2036 Fixed argument const correctness 2021-08-27 13:21:02 +02:00
akallabeth f1bde376b1
Raw channel send (#7255)
* Added raw channel data write function

* Use nego_set_state

* Added ArrayList_ForEachAP

* Provide va_copy for older VS compilers
2021-08-26 16:17:51 +02:00
Armin Novak 68f24477f6 Fixed compilation warnings on mac 2021-08-26 15:08:28 +02:00
Armin Novak 13f54fc0dd Improved fingerprint hash comparison
* Allow new hash format 11bbccdd along already supported 11:22:aa:BB
2021-08-26 09:38:12 +02:00
Armin Novak 06c883a709 Fix #7249: Endless loop in NLA 2021-08-26 09:26:34 +02:00
Armin Novak c073ca8ac8 Use MAXIMUM_WAIT_OBJECTS 2021-08-25 13:41:38 +02:00
Armin Novak 55d2363efb Removed alloca use from WaitForMultipleObjectsEx 2021-08-25 13:41:38 +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 64d675a728 Fixed warnings in shadow server. 2021-08-25 10:54:24 +02:00
Armin Novak 054f0ea260 Use defines instad of channel names 2021-08-25 10:54:24 +02:00
Armin Novak d9ea91361c Fixed freerdp_peer_free
* Close socket on free
* Added WINPR_ASSERT for all dereferenced pointers
2021-08-24 15:05:36 +02:00
akallabeth 617293e0d3
Cleanups (#7239)
* Use freerdp_settings_* for shadow and sample server

* Added freerdp_peer_set_local_and_hostname

* Code cleanups and WINPR_ASSERT

* Code cleanups

* Use CHANNEL_NAME_LEN where appropriate
* Use temporary variables in loop instead of direct array access
2021-08-24 14:09:40 +02:00
Armin Novak 5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak cbb06a7c17 Fixed DsParse implementations and tests
* Implemented DsMakeSpnW
* Removed unimplemented DsCrackSpnA and DsCrackSpnW
2021-08-24 10:45:57 +02:00
Armin Novak 04ff6b8824 Implemented TestFileDeleteFile 2021-08-24 10:45:57 +02:00
Armin Novak af0ce13d8a Removed not implemented module 2021-08-24 10:45:57 +02:00
Armin Novak 5eea7fc12d WINPR_UNUSED argc, argv for unit tests 2021-08-24 10:45:57 +02:00
Armin Novak f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Hans-Peter Jansen 297f965052 Fix linking, if BUILTIN_CHANNELS switched off
If -DBUILTIN_CHANNELS=OFF is supplied to cmake, auxiliary channel modules
are built as plugins, that are loaded from $LIBDIR/freerdp as shared libs.

This patch fixes the linkage of these plugins by taking inter-channel dependencies
of this separation into account. If BUILTIN_CHANNELS=ON, these channel modules
are linked directly into the main modules. Therefore, the linking of the plugins
is conditioned accordingly.
2021-08-24 08:43:01 +02:00
Simon Nivault e42696bb2e
Some fixes for audin redirection (#7231)
* Fixed research for native PCM format

* Fixed compatibility detection for resampling

* dsp: Makes channel mix and encoding process use separated buffers

* Give FramesPerPacket to freerdp_dsp_context_reset function

* dsp: Fix DVI_ADPCM codec by respecting the required packet size

* Forbid mono channel in macos

* Fix audin command line channel option

* Disable ADPCM codec as it does not work

* Refactor valid native codec research

* Native codec research: Try different channels number

* Fix dsp channel mix

* Fix dsp resample
2021-08-23 14:49:28 +02:00
akallabeth a7cdd03809
Fixed check of orderLength for secondary orders (#7233)
The orderLength field of [MS-RDPEGDI] 2.2.2.2.1.2.1.1 might be
negative if not adjusted for the 13byes of the header.
2021-08-23 12:08:35 +02:00
Pascal Nowack 8fe794b312 winpr/clipboard: Omit last line ending for gnome-copied-files
Every uri in the x-special/gnome-copied-files mime type is separated by
a '\n' char.
However, not every line ends with '\n'. The last line MUST not include
the new line character.
2021-08-19 09:08:11 +02:00
Mike Gilbert 5208a67ea7
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
2021-08-16 22:11:03 +02:00
Ondrej Holy 67f3fff2c8
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
2021-08-03 15:28:58 +02:00
Armin Novak b7d612d843 Remove variable shadowing 2021-08-02 10:28:06 +02:00
Armin Novak 00c5a42eef Fixed warnings in TestLinkedList 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
Mike Gilbert 0c81c73c8d winpr: avoid calling FIPS_mode() with OpenSSL 3.0
Fixes: 26bf2816c3
2021-08-02 08:27:07 +02:00
Fabrice Fontaine 0976cce458 winpr/include/winpr/file.h: fix build on uclibc
Include stdio.h to fix the following build failure with uclibc raised
since version 2.4.0 and
eb6777ea69:

In file included from /tmp/instance-0/output-1/build/freerdp-2.4.0/winpr/libwinpr/utils/lodepng/lodepng.c:30:
/tmp/instance-0/output-1/build/freerdp-2.4.0/winpr/include/winpr/file.h:524:11: error: unknown type name 'FILE'
 WINPR_API FILE* winpr_fopen(const char* path, const char* mode);
           ^~~~

Fixes:
 - http://autobuild.buildroot.org/results/31e770a330158035e24b7b952bec0030138482b7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-08-01 09:37:24 +02:00
Armin Novak 0fc21f51f5 Fixed #7200: /bpp parsing fixed 2021-07-29 18:29:16 +02:00
Armin Novak 6854c7da7e Fixed windows audio recording issues:
1. Fix recording channels to mono
2. Fix alignment of PCM data to 2 bytes
2021-07-29 15:27:24 +02:00
Armin Novak 275f9ab2f6 Added listforeach wrapper 2021-07-29 15:09:53 +02:00
Armin Novak 8a74bdb371 Fixed cast warning 2021-07-29 15:09:53 +02:00
Armin Novak 7c14196000 Added log message for invalid DrivesToRedirect data 2021-07-29 15:09:53 +02:00
Armin Novak 4e3a7562af Clarified log message for device redirection 2021-07-29 15:09:53 +02:00
Armin Novak 4b7aa61abd Fixed tls_write_all, abort if blocked
If data to be read is blocking the socket abort.
2021-07-29 15:09:53 +02:00