Commit Graph

417 Commits

Author SHA1 Message Date
akallabeth
b008e83179 Fixed API const correctness 2021-12-01 10:28:53 +01: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
akallabeth
1904020d7f
Some code cleanups and WINPR_ASSERT (#7281) 2021-09-10 09:06:35 +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
Armin Novak
50e9d3adf9 Implemented new AuthenticateEx callbacks. 2021-09-04 18:01:30 +02:00
Armin Novak
c073ca8ac8 Use MAXIMUM_WAIT_OBJECTS 2021-08-25 13:41:38 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak
f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +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
akallabeth
b453d5e40e Fixed rdtk, uwac and winpr standalone builds 2021-06-22 08:54:18 +02:00
Armin Novak
09111c9270 libfreerdp: 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
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
d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak
a1c8e4cf85 Refactored ArrayList_Add to conform to other functions 2021-06-16 11:46:42 +02:00
Armin Novak
d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
akallabeth
ddfdbb1300 Added rdg_read_http_unicode_string error messages
Added log entries in case something in the packet is wrong
2021-05-25 08:54:09 +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
Ondrej Holy
892cbe3261 Fix various memory leaks reported by Coverity
Covscan report contains various memory leak defects which were marked
as important. I have spent some time analyzing them and although they
were marked as important, most of them are in error cases, so probably
nothing serious. Let's fix most of them anyway. The rest are false
positives, or too complicated to fix, or already fixed in master, or
simply I am unsure about them.

Relates: https://github.com/FreeRDP/FreeRDP/issues/6981
2021-04-27 14:25:20 +02:00
Armin Novak
5fc2290c03 Added option to disable gateway websocket support 2021-03-08 14:33:05 +01:00
akarl
7382a5c7bf use tlsOut BIO when using websocket in rdg_bio_ctrl 2021-03-05 22:02:49 +01:00
sss
6574fdf6e4 reverted changes from clang-format 2021-02-25 14:05:40 +01:00
Gluzskiy Alexandr
bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
akallabeth
1dae0552d7 Fixed various warnings 2021-02-16 16:28:57 +01:00
Michael Saxl
bc52147fbb rdg websocket support 2021-02-09 18:47:14 +01:00
Martin Fleisz
83658d2121 gateway: Fix consent/service message in legacy gateway code 2021-01-27 14:58:07 +01:00
akarl10
43691d59ee
Fr6731 (#6734)
* Implement chunked encoding for RDG_OUT_DATA
2021-01-25 08:39:30 +01:00
Martin Fleisz
8ed51bc5f5 core: Remove error code from string returned by rpc_error_to_string
This PR removes the error code from the error string returned by
rpc_error_to_string. The error code is passed into the function so it is
not necessary to append it to the returned string as well.

The PR also fixes the screwed formatting of the error code tables.
2021-01-11 10:21:21 +01:00
Martin Fleisz
f5177ca7e7 rdg: Read and set error code when ending an RD Gateway session 2020-12-22 15:51:00 +01:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Martin Fleisz
0f64e07444
Merge pull request #6424 from akallabeth/warning_fixes
Fixed #6418: Warning due to invalid const qualifier
2020-08-11 08:25:38 +02:00
Armin Novak
bfa07e701d Refactored rdg_read_http_unicode_string warning fixes 2020-08-10 16:39:49 +02:00
Armin Novak
57b405ca26 Fixed compilation warnings. 2020-08-10 12:14:11 +02:00
Armin Novak
226b072af8 Fixed #6418: Warning due to invalid const qualifier 2020-08-10 11:47:52 +02: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
e8c99f3a00 gateway: Add processing of consent and service messages with HTTP gateway 2020-08-04 15:58:48 +02:00
Armin Novak
0d80353bf3 Added missing SECBUFFER_READONLY flag in rpc_client_write_call 2020-06-19 11:31:13 +02:00
Armin Novak
ff79636d33 TSG improvements
* Respect connection timeout during connect
* Better debug output
* Cleaned up data types,
2020-06-19 11:31:13 +02:00
Martin Fleisz
cf7b9ca055 Fix usage of DsMakeSpn with IP address hostnames 2020-06-15 15:38:54 +02:00
Armin Novak
0195de02f5 Fixed #6199: Reading version information in tsg 2020-05-20 15:02:24 +02:00
Kobi Mizrachi
fddda159d9 change use of strtok to strtok_s 2020-05-18 11:08:20 +02:00
akallabeth
6b485b146a Fixed oob read in irp_write and similar 2020-05-06 13:31:57 +02:00
Armin Novak
ac4bb3c103 End connection before user callbacks if aborted.
If somewhere in freerdp_connect freerdp_abort_connect was called
the user callbacks Authenticate, GatewayAuthenticate and
Verify[Changed|X509]Certificate[Ex] must not be called.
2020-02-19 16:44:42 +01:00
Armin Novak
895cb8f944 Added macro freerdp_set_last_error_if_not
This macro replaces the multiple instances where the current
error state is checked before setting an optional error state.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 10:34:27 +01:00
Armin Novak
7d252cdc8e Added freerdp_set_last_error_ex function
This new function allows better logging of call locations
for errors. Additionally added freerdp_set_error_log macro
to record function, file and line the error was set.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:39:25 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00