Commit Graph

4684 Commits

Author SHA1 Message Date
eronnen
4c78b66822 always initializing MediaCodec with non-zero resolution, adjusting to codec output resolution 2022-01-31 11:20:27 +01:00
akallabeth
4a29b29a53
Fix #7586: Update size of tile cache if required. (#7602) 2022-01-28 09:07:27 +01:00
dance
122268aec1 code cleanup: don't allocate excessive memory in update_read_bitmap_update
removed no more actually used count property of BITMAP_UPDATE struct,
fixed allocating twice as memory for its rectangles - as of refactoring
at e5767f07 BITMAP_UPDATE struct is reused no more
2022-01-27 10:52:02 +01:00
Armin Novak
6f3761b8bf Fixed too eager assert. 2022-01-26 12:22:41 +01:00
Armin Novak
61e7f5796f Added missing include 2022-01-26 10:24:26 +01:00
Armin Novak
4d29cb3700 Fixed statement expressions and missing goto 2022-01-26 10:24:26 +01:00
Armin Novak
d3ae4cf26d Added code assertions, fixed loading order 2022-01-26 10:24:26 +01:00
Ely Ronnen
633c1abf44 handling small input buffer case 2022-01-26 10:24:26 +01:00
Ely Ronnen
91540862df import libmediandk.so dynamically 2022-01-26 10:24:26 +01:00
Ely Ronnen
52202762e8 adding mediacodec h264 implementation using NDK 2022-01-26 10:24:26 +01:00
David Runge
d0488f8692 Guard avcodec_register_all() calls
{channels/tsmf/client/ffmpeg/tsmf,libfreerdp/codec/dsp}_ffmpeg.c:
Guard calls to `avcodec_register_all()` against use beyond
`AV_VERSION_INT(58, 10, 100)`, where upstream ffmpeg made it obsolete.
2022-01-25 08:52:29 +01:00
akallabeth
6abd5f6c79
FFmpeg deprecated guards (#7574)
* Fixed missing ffmpeg deprecation guard

* Fixed compilation type warning
2022-01-24 09:49:07 +01:00
akallabeth
a337031b24
Cache Emulate_IsConfigured result (#7569)
* Cache Emulate_IsConfigured result

The check is used very often, so this caching reduces necessary
allocations.

* Fix winpr_HexLogDump

Abort function early if the log message is to be discarded due to
the log level being inactive.

* Use common logger for rdpdr message

Co-authored-by: Martin Fleisz <martin.fleisz@thincast.com>
2022-01-21 13:24:20 +01:00
Armin Novak
9c7ec3888a Added deprecation to *get_fds functions 2022-01-21 08:59:09 +01:00
akallabeth
724c6f8192
Proxy cleanups (#7568)
* Fixed C++ issues with proxy context

* Added freerdp_settings_get_string_writable

* Define WITH_PROXY_EMULATE_SMARTCARD in config.h
2022-01-20 11:12:36 +01:00
David Fort
990b3cf7bb
smartcard_emulate: change the announced ATR (#7564)
This other ATR seems to be more recognized by new windows versions.
2022-01-19 12:00:53 +01:00
akallabeth
e6e6ed5dbd Cleaned up PubSub
* Callback arguments now const
* Fixed missing includes
2022-01-19 09:24:57 +01:00
Armin Novak
1fedd36f65 Fixed proxy compilation issues after rdpUpdate refactoring 2022-01-18 11:24:23 +01:00
Armin Novak
0b3d5351e1 Removed internal members of rdpSecondaryUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
504336f796 Removed internal members of rdpPrimaryUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
3006c973c4 Removed internal members of rdpAltSecUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
6973c5dce2 Removed internal members of rdpInput from API header 2022-01-18 11:24:23 +01:00
Armin Novak
d210ac5e33 Removed internal members of rdpUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
9bd519d892 Do not reset scard context cancel 2022-01-18 09:02:07 +01:00
akallabeth
204f9a4678 Capability debug level set to verbose 2022-01-13 17:20:48 +01:00
Armin Novak
33f87e3349 Fix checks for input flags:
The settings have double meaning:
* Setting the default in client preconnect callback can disable
  announcement of a flag to the server regardless of support
* If set it is overridden with the value the server supports
2022-01-13 16:34:05 +01:00
Armin Novak
339cdded45 Fixed memory sanitizer warnings 2022-01-11 14:32:18 +01:00
akallabeth
7c9117cf86 Fixed size checks for locale detection.
Reported by George Zaytsev from Positive Technologies
2022-01-11 14:32:18 +01:00
Armin Novak
4e6e5be654 Added proxy intercept channels
* New configuration to intercept certain channels
* Added rdpdr intercept implementation
2022-01-11 12:34:43 +01:00
Armin Novak
3c72cc3306 Refactored rdpdr and dependent channels
* Move parsing code to core library
* Move definitions to public API to allow access from outside
* Move smartcard related parsing to core library
2022-01-11 12:34:43 +01:00
akallabeth
8c543b1de2 Added smartcard emulation layer 2022-01-11 12:34:43 +01:00
Armin Novak
98348ef62a Removed ndr.h from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
3de6af34ed Removed unused module winhttp 2021-12-23 14:27:12 +01:00
Armin Novak
0fb83a304d Adjusted channelID and server SetVolume data types 2021-12-20 08:11:00 +01:00
Armin Novak
f3df9a520e Fixed H264 related warnings 2021-12-20 08:11:00 +01:00
akallabeth
feb6d9ae5c
Set last error on activation timeout (#7502) 2021-12-17 17:28:41 +01:00
Armin Novak
e5ce4b49e7 Added logging in gcc_write_client_monitor_data 2021-12-17 10:06:54 +01:00
akallabeth
2d9416e499 gcc core data cleanup 2021-12-16 12:54:53 +01:00
akallabeth
19ee9f0cce Fix freerdp_channels_process_message cleanup
Not all code paths did clean up the message, specifically WMQ_QUIT
2021-12-16 10:53:17 +01:00
Armin Novak
d248b635a5 Added Redirect callback 2021-12-15 14:38:13 +01:00
Armin Novak
b545094664 Cleaned up redirection code 2021-12-15 14:38:13 +01:00
Armin Novak
bb0eeeb264 Use stack string buffer for ClientHostname and ID 2021-12-15 13:36:15 +01:00
Armin Novak
007e061f77 Fixed capability debugging 2021-12-15 13:36:15 +01:00
akallabeth
97ae26d47f Fixed rdp_write_logon_info_v2:
Set size field according to
[MS-RDPBCGR] 2.2.10.1.1.2 Logon Info Version 2 (TS_LOGON_INFO_VERSION_2)
2021-12-15 13:36:15 +01:00
akallabeth
9d7e2cc3d0 Code refactoring, use initializer instead of memset 2021-12-15 13:36:15 +01:00
akallabeth
94685c9482 Updated freerdp_settings_set_string
Allow NULL argument with length, creates an empty string
2021-12-15 13:36:15 +01:00
David Fort
a6cadd6f97 winpr: fix compilation for mingw
Depending on the version of mingw some export macro aren't always defined.
2021-12-14 14:12:01 +01:00
Armin Novak
874f47f01e Added more error checks to nego 2021-12-14 13:46:34 +01:00
Armin Novak
72d6671d5f Improved bitmap chache input checks 2021-12-14 13:46:34 +01:00
akallabeth
1265114be7
Fixed freerdp_disconnect (#7479)
Added a missing call to freerdp_abort_connect to ensure all
threads terminate in an orderly fashion
2021-12-06 09:41:05 +01:00
Fabian Vogt
10ee86527a Make H.264 codec optional during runtime
It's possible that FreeRDP was built against FFmpeg, but it doesn't support
H.264. In that case, just continue without H.264 support instead of failing
hard before even trying to connect.

This is especially useful for Linux distributions which can't ship H.264
support in FFmpeg out of the box (patent issues), but allow enabling H.264
later by installing a version of FFmpeg which has it enabled.
2021-12-06 09:19:52 +01:00
akallabeth
b008e83179 Fixed API const correctness 2021-12-01 10:28:53 +01:00
Armin Novak
3325ac450e Fixed #7454: When error_info is received abort
If an error_info with a failure is received, call
freerdp_abort_connect to terminate the connection.
2021-11-30 08:20:29 +01:00
akallabeth
6ee60ea15a Fixed various warnings 2021-11-30 08:20:19 +01:00
akallabeth
e13efff01a
Abort transport_read_layer loop when abortEvent is set. (#7464) 2021-11-26 12:30:43 +01:00
akallabeth
5537667e0c
Removed WINPR_ASSERT with wrong assertions. (#7444) 2021-11-16 14:03:53 +01:00
David Fort
67986ea298 Fix compilation with mingw
This patch addresses some issues when compiling against mingw. With these changes
FreeRDP can be compiled out-of-the box on a Ubuntu 20.04.
2021-11-15 09:23:16 +01:00
Armin Novak
67f632982a Fixed YUV decoder API
Need to verify widht and height more rigorously.
2021-11-15 09:23:00 +01:00
akallabeth
755f2ce218 Ignore redirection password in case of smartcard auth 2021-11-05 13:00:21 +01:00
akallabeth
58b24f13fe
Add an option to add the plugin and extension to rpath (#7425) 2021-11-04 08:59:38 +01:00
Armin Novak
69ff22e2a3 Fixed #7332: Missing NULL check 2021-11-02 09:52:01 +01:00
Steve Pronovost
78fd3b8d6c Code review feedback from FreeRDP folks
Before rolling into path for easy review.
2021-10-21 13:11:21 +02:00
Steve Pronovost
49d9e61884 Fix protocol violation when uploading large ICON
When uploading large ICON (96x96), we end up growing the stream
mid-update. Stream_EnsureCapacity end up reallocating the stream
with a larger capacity to accomodate the large ICON size, but in
doing so, also updating the sealed length for the data currently in
the stream. This breaks the assumption between update_begin_paint
and update_end_paint where the sealed lenght is used to keep track
of the location where we need to update the orders counts after
we're done accumulating update. As a result of the growth and lost
of that location, the number of orders is written to the wrong
location and the resulting stream is invalid which result in a
protocol violation and a connection drop.

The current fix uses a new offsetOrder in the update object to
keep track of where update_end_paint needs to write the number
of orders contained. I think a better fix would be for
Stream_EnsureCapacity to preserve the sealead length of the
stream on growth, but this has a much more significant impact and
careful analysis needs to be done to ensure this doesn't violate
other assumption. Need to follow up with FreeRDP developer to get
their take on this one.
2021-10-21 13:11:21 +02:00
Steve Pronovost
dba2a7e4a6 Add support for HyperV socket connection
This commit add support for connection over HyperV socket (hvsock) which are
used in scenario like WSLg on Windows. hvsock requires accept and close
to monitor in addition to read. Also mark hvsock connection as local.
2021-10-21 13:11:21 +02:00
Steve Pronovost
592f8d95be Fix connection negotiation with mstsc/msrdc
mstsc/msrdc includes an optional correlation info
(RDP_NEG_CORRELATION_INFO) during connection negotiation. This confuses
FreeRDP which interpret this as a cookie and eventually fails the
negotiation, preventing a successful connection to these RDP client.

This commit addresses 3 things.

1) When processing connection token or cookie, skip if the remaining
bytes are neither.
2) After processing the RDP_NEG_REQ info, skip the optional correlation
info (RDP_NEG_CORRELATION_INFO) if one is present.
3) Allow local connection without server certificate when the client
inherently trust the server.
2021-10-21 13:11:21 +02:00
akallabeth
a71235be74
Cert update fix (#7382)
* Fixed certificate thumbprint default format

* Fixed VerifyChangedCertificateEx call arguments
2021-10-21 09:07:52 +02:00
Alexandru Bagu
95cb4672b3 fix build issues for VS2010 2021-10-20 08:35:16 +02:00
Alexandru Bagu
07ea60e960 add optional support for win32 console
* add option to build as console by using WITH_WIN_CONSOLE
* add passphrase read from stdin for Win32
* fix windows authentication with stdin password
* allow redirected stdin to be used for stdin input
* flush stdout to help with automation
* use stdin when /from-stdin is present
* add error log for stdin flag but stdin redirected
2021-10-20 08:35:16 +02:00
Armin Novak
0e991a1078 Use original height for h264 context, but allocate padded height. 2021-10-19 15:41:49 +02:00
Armin Novak
76c419e690 Remember avc420 allocation width and height 2021-10-19 15:41:49 +02:00
Armin Novak
5037659859 Fixed freerdp_device_clone for serial devices 2021-10-18 16:09:13 +02:00
Armin Novak
ceee946e0b Fixed warnings 2021-10-18 16:09:13 +02:00
Armin Novak
95d9365dc8 Fixed warnings 2021-10-18 16:09:13 +02:00
Armin Novak
ed11a22edb Fixed device copy 2021-10-18 16:09:13 +02:00
Armin Novak
be0433a1fb Use freerdp_settings_set_pointer_len instead of calloc 2021-10-18 14:48:27 +02:00
Armin Novak
0848ad1a71 Use realloc and Stream_StaticConstInit for certificate 2021-10-18 14:48:27 +02:00
Armin Novak
d491031be2 Fixed copy of ServerCertificate 2021-10-18 14:48:27 +02:00
Armin Novak
dec4cb4d73 Fixed rdpdr device name setting 2021-10-18 12:49:38 +02:00
Armin Novak
990400aedd Close SVC channels in WTSVirtualChannelClose 2021-10-18 12:49:38 +02:00
Armin Novak
41d77cae46 Fixed /video buffer alignment, added assertions 2021-10-18 10:53:05 +02:00
Armin Novak
a1a7724b88 Fixed freerdp_image_fill scanline detection 2021-10-18 10:53:05 +02: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
07b789c880
Gateway legacy parser fix (#7362)
* Implemented missing TSG debug functions

* 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
2021-10-15 11:45:08 +02:00
Armin Novak
73fbbcf0fb Fixed const warnings 2021-10-14 13:04:59 +02:00
Armin Novak
cf74a6ea3f Fixed const cast warnings in generated settings setter 2021-10-14 13:04:59 +02:00
Armin Novak
07df48c91d Removed unused variable 2021-10-14 13:04:59 +02:00
akallabeth
da3c1197a2 Fixed GFX alpha painting 2021-10-14 13:01:26 +02:00
akallabeth
3ccb96d52f Fixed #7350: Warnings with Stream_StaticInit
* Properly initialize the stream buffer
* Add Stream_StaticConstInit accepting a const buffer
* Modify API to return a pointer to the stream initialized
2021-10-14 12:11:16 +02:00
akallabeth
217e0caa18
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
2021-10-12 12:26:22 +02:00
Hans-Peter Jansen
74d7b4c9b7 Add some ADDIN_PATH debug messages 2021-10-11 08:38:53 +02:00
akallabeth
51268bbcba
Lock updates during gdi_resize (#7330) 2021-10-07 10:25:09 +02:00
Armin Novak
33bc2ba2ab Fixed static-in-line warnings 2021-10-06 09:49:07 +02:00
Armin Novak
18a3fcf2fc Updated wStream API and added torough checks
* Do length/capacity checks in every read/write/seek function
  if WINPR_ASSERT is defined.
* Ensure s->pointer is valid, e.g. within s->buffer + s->capacity
  (Stream_Rewind, Stream_Seek, ...)
* Add return values to Stream_Set* functions so inalid arguments
  can be reported to the caller
* Deprecated problematic stream manipulation functions
  (Stream_SetBuffer, Stream_SetPointer, Stream_SetCapacity)
* Ensure length/capacity functions never return a value larger
  than the actual length/capacity
2021-10-06 09:49:07 +02:00
Armin Novak
103ff6a758 Fixed certificate store double free. 2021-10-06 09:49:07 +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
Martin Fleisz
e7bfcc37fc core: Fix invalid memory access in local peer detection 2021-09-22 14:32:26 +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
7b7e2d6f32 Prefer constant division over multiplication for length checks 2021-09-21 08:55:22 +02:00
Jeremy Cross
6547db2f17 early bail from update_read_window_state_order when handling WINDOW_ORDER_FIELD_WND_RECTS breaks subsequent protocol parsing 2021-09-21 07:43:03 +02:00
Armin Novak
0ccebb2a0f Fixed missing NULL checks. 2021-09-20 10:59:59 +02:00
akallabeth
3ce622b638 Fixed FreeRDP_WTS* failure handling 2021-09-20 10:59:59 +02:00
akallabeth
bc800175d1 Fixed proper reset ov member variable to NULL 2021-09-20 10:59:59 +02:00
akallabeth
bc80fe3580 Improved server accept log message 2021-09-20 10:59:59 +02:00
akallabeth
d1b58ab263 Refactored rdpRdp cleanup handling 2021-09-20 10:59:59 +02:00
akallabeth
6b24c2be10 Added WINPR_ASSERT and cleanup fixes in freerdp.c 2021-09-20 10:59:59 +02:00
akallabeth
c1e38b24a6 Replaced manual settings value allocation with setter 2021-09-20 10:59:59 +02:00
akallabeth
04a8ced567 Added WINPR_ASSERT and proper error reset in client.c 2021-09-20 10:59:59 +02:00
akallabeth
bfb9a89639 Loop data type fix in certificate.c 2021-09-20 10:59:59 +02:00
akallabeth
73223638dd WINPR_ASSERT in bulk.c 2021-09-20 10:59:59 +02:00
akallabeth
c2d126cdd8 Streamlined rdpCodec cleanup routines 2021-09-20 10:59:59 +02:00
akallabeth
ce8ef33ea4 Added WINPR_ASSERT in transport 2021-09-20 10:59:59 +02:00
akallabeth
75e6f443b5 Fixed possible leak in tls_prepare
If the function fails, the 'underlying' BIO was leaking as
tls_free did not clean it up if 'tls->bio' was not successfully
allocated.
2021-09-20 10:59:59 +02:00
akallabeth
1ca7e1f7a0 Added option to disable graphics decoding in client code path 2021-09-20 10:59:59 +02:00
akallabeth
41aaafef77 Added unicode input for xfreerdp 2021-09-17 07:21:45 +02:00
akallabeth
00c083a854 Fixed compilation warnings. 2021-09-14 09:45:03 +02:00
akallabeth
c7aa330091 Fixed #7280: Missing return 2021-09-13 08:23:13 +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
akallabeth
1904020d7f
Some code cleanups and WINPR_ASSERT (#7281) 2021-09-10 09:06:35 +02:00
Armin Novak
673fb46836 Fixed uninitialized warnings 2021-09-10 08:16:25 +02:00
Armin Novak
0fe1e2359e Fixed all reserved-id-macro warnings 2021-09-10 08:16:25 +02:00
Armin Novak
b41093be20 Fixed missing NULL set 2021-09-09 08:53:20 +02:00
Armin Novak
56648a98f2 Fixed rdp_reset error handling 2021-09-09 08:53:20 +02:00
Armin Novak
b336751861 Fixed AuthenticateEx issues 2021-09-09 08:53:20 +02:00
Armin Novak
85f1d46eab Fixed cache issues
* Use rdpContext as reference instance
* WINPR_ASSERT what is not otherwise checked
2021-09-09 08:53:20 +02:00
akallabeth
3409f8d3b0 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-09 08:53:20 +02:00
Armin Novak
368b9f8e9c Fixed CloseThreadpool calls
Requires NULL checks before call
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
4e44003832 Expose dynamic channel PDU types 2021-09-09 08:53:20 +02:00
Armin Novak
976c3c2ab9 Refactored proxy and proxy-modules:
* Split out proxy headers and moved to public API to allow external
  modules to be built.
* Split proxy into proxy library and proxy binary. The library
  can be used by other applications and provides a simple API
* Improved channel passthrough, now all channels including dynamic
  channels work.
* Extended module API to hook more events, improved module samples
* Cleaned up proxy code, removed global static variables used,
  added WINPR_ASSERT
2021-09-09 08:53:20 +02:00
Armin Novak
81a2f9e434 WINPR_ASSERT activation.c 2021-09-09 08:36:01 +02:00
Armin Novak
37ed889fd7 Removed duplicate fields from rpdRpc
* Removed rdpRpc::context
* Removed rdpRpc::settings
2021-09-09 08:36:01 +02:00
Armin Novak
17f530a866 Transport opaque 2021-09-09 08:36:01 +02:00
akallabeth
6a5070722a Removed rdpMcs::settings 2021-09-09 08:36:01 +02:00
akallabeth
c2f1562a4b Removed freerdp_peer::input 2021-09-09 08:36:01 +02:00
Martin Fleisz
c2819a00c9 nla: Remove incorrect check when using NLA with a NULL identity
When using NLA with a NULL identity (in AcquireCredentialsHandle) on
Windows the client sends the first NLA package with cbBuffer set to 0.
In that case the client currently incorrectly kills the connection. With
this PR the check is removed and the client correctly connects to the server.
2021-09-08 14:02:00 +02:00
akallabeth
64403d9d40 Refactored rdpFastpath
* Structure now opaque
* Added WINPR_ASSERT where appropriate
2021-09-06 10:11:14 +02:00
akallabeth
c17ba281a3 Fixed default return for missing SurfaceBits callback 2021-09-06 10:11:14 +02:00
akallabeth
d7d7c45b0e Cleaned CONNECT_STATE transition function 2021-09-06 10:11:14 +02:00
akallabeth
c2a7a78d94 Changed transport IO functions to take rdpContext 2021-09-06 10:11:14 +02:00
akallabeth
32b3f54bb3 Expose CONNECTION_STATE via public API
* Expose type CONNECTION_STATE
* Add getter freerdp_get_state
* Add helper freerdp_state_string
2021-09-06 10:11:14 +02:00
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
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
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
50e9d3adf9 Implemented new AuthenticateEx callbacks. 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
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
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
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
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
Armin Novak
610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +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
Armin Novak
61b46adaf1 Fixed WITH_WINPR_VERBOSE_ASSERT compile flag
* Compile flag was not always set
* Fix broken WINPR_ASSERT usages detected
2021-07-29 15:09:53 +02:00
Armin Novak
d65d4ee4fb Allow variable arguments to setChannelError 2021-07-29 15:09:53 +02:00
Martin Fleisz
ca8f7d7174
rdg: Fix mem leak and oob write in rdg websocket close reply (#7173) 2021-07-14 11:22:41 +02:00
Armin Novak
6e075a6a7d Fixed #7158: detection of arm neon. 2021-07-08 07:54:26 +02:00
akallabeth
2ac12c558a Added option to allow planar topdown encoding. 2021-07-02 09:53:24 +02:00
akallabeth
77a7e4010f Added bounds checks to ExtractRunLength 2021-07-02 09:53:24 +02:00
akallabeth
5a85a824d2 Used settings getter/setter for NSCodec 2021-07-01 11:56:17 +02:00
akallabeth
6deb65175f Added GFX planar and rfx encoder to shadow 2021-07-01 11:56:17 +02:00
akallabeth
bd256b91bc Fixed disabling of AVC444 mode if requested 2021-07-01 11:56:17 +02:00
akallabeth
242f1734ec Fixed dpkg-buildpackage warnings 2021-06-30 11:57:23 +02:00
akallabeth
457b198c11 Properly reset gfx->codecs after free. 2021-06-30 09:08:49 +02:00
Armin Novak
42df492450 Progressive compress cleanup 2021-06-28 18:29:47 +02:00
Armin Novak
98ed05ff5c Added PROGRESSIVE codec to shadow 2021-06-28 16:51:27 +02:00
Armin Novak
fd08c77f7f Fixed definition of config.h symbols 2021-06-28 15:06:30 +02:00
Armin Novak
a7f7de549a Added SuspendInput setting
Allows to disable all keyboard/mouse/multitouch input from the
client side.
2021-06-28 14:35:26 +02:00
Armin Novak
e5eb6368e5 Added missing GFX sanity check 2021-06-28 13:25:33 +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
f1dc3a0494 Fixed use of deprecated function 2021-06-21 13:27:39 +02:00
Armin Novak
6eab6391c7 Fixed invalid return value conversion 2021-06-21 13:27:39 +02:00
Armin Novak
09111c9270 libfreerdp: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
Armin Novak
09cf11ecf0 WinPR: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
akallabeth
6726772d8d Fixed integer warnings 2021-06-18 09:41:02 +02:00
akallabeth
8d82adb28a Fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak
2e0d1cc33c Fixed integer warnings, fixed data types 2021-06-17 10:35:22 +02:00
Armin Novak
d9a8083ddf Added WINPR_NORETURN, fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak
e71760a710 Fixed lots of compilation warnings and type mismatches 2021-06-17 10:35:22 +02:00
akallabeth
112400ca66 Removed stub for x264, not implemented 2021-06-16 15:21:56 +02:00
Armin Novak
5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak
ccfe0c129e Removed checks already done by WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak
31862e60f9 Added missing return checks 2021-06-16 11:46:42 +02:00
Armin Novak
c2bef2bfa9 Fixed return value checks for ArrayList_Append and HashTable_Insert 2021-06-16 11:46:42 +02:00
Armin Novak
ea8858c705 Renamed planar ALIGN macro to avoid name collission on osx 2021-06-16 11:46:42 +02:00
Armin Novak
d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00