akallabeth
70eec6c18e
[coverity] 1543279 Out-of-bounds read
2024-04-12 09:45:09 +02:00
akallabeth
501b86baf4
[coverity] 1543153 Resource leak
2024-04-12 09:45:09 +02:00
akallabeth
6241ce5674
[coverity] 1543052 Out-of-bounds read
2024-04-12 09:45:09 +02:00
akallabeth
285bea320d
[coverity] 1543217 Resource leak
2024-04-12 09:45:09 +02:00
akallabeth
8d9244cb3d
[coverity] 1543259 Resource leak
2024-04-12 09:45:09 +02:00
akallabeth
d3eb93f2ec
[coverity] 1543248 Resource leak
2024-04-12 09:45:09 +02:00
akallabeth
cf5df96c14
[coverity] 1543228 Out-of-bounds read
2024-04-12 09:45:09 +02:00
akallabeth
da85ec371c
[coverity] 1543065 Resource leak
2024-04-12 09:45:09 +02:00
akallabeth
18b4c59d17
[coverity] 1543107 Resource leak
2024-04-11 12:04:07 +02:00
akallabeth
2fefc29249
[coverity] 1543164 Free of address-of expression
2024-04-11 12:04:07 +02:00
akallabeth
1affbd0655
[coverity] 1543285 Resource leak
2024-04-11 12:04:07 +02:00
akallabeth
1e325dc2de
[core,settings] add missing autoreconnect option
...
Split settings, there was a double use for AutoReconnectEnabled.
AutoReconnectEnabled is a setting responsible for client side
autoreconnection.
AutoReconnectPacketSupported is a flag set by the server to announce
support for AutoReconnectPacket allowing fast reconnect.
2024-04-11 11:19:18 +02:00
Ilya Shipitsin
1f3a49c57a
libfreerdp/utils/http.c: fix resource leak
...
found by coverity
128 if (winpr_asprintf(&headers, &size, post_header_fmt, path, hostname, blen) < 0)
CID 424888: (#1 of 1): Resource leak (RESOURCE_LEAK)
15. leaked_storage: Variable hostname going out of scope leaks the storage it points to.
129 return FALSE;
130 }
2024-04-08 11:39:20 +02:00
akallabeth
0905796cd7
[core,gateway[ fix use after free
2024-04-06 09:17:17 +02:00
Ilya Shipitsin
25edec803b
libfreerdp/crypto/certificate.c: handle malloc error
2024-04-06 07:11:14 +02:00
Armin Novak
8b2e13d989
[emu,scard] abort busy loop on session cancel
2024-04-05 13:06:57 +02:00
Ilya Shipitsin
309509808c
libfreerdp/core/gateway/rdg.c: handle malloc failure
2024-04-05 09:59:12 +02:00
Armin Novak
1b7e0ffb97
[core,smartcard] allow userhint to match UPN
...
the username might match the UPN of the smartcard certificate. If not
fall back to compare to userHint
2024-04-04 14:05:39 +02:00
Armin Novak
e5799ec947
[locale,xkbfile] improve mapping
...
* Add missing keycodes to mapping
* Use sorted list to create mapping table
2024-04-03 08:22:25 +02:00
akallabeth
82dc655979
[core,gateway] improve warning for bad request
...
In case of E_PROXY_ORCHESTRATION_LB_SESSIONHOST_DEALLOCATED print a
warning with the message body or a generic fallback should that not be
provided.
2024-03-26 09:19:45 +01:00
akallabeth
31a131b9e4
[crypto,cert] follow up to #10002
...
Ensure we always compare the lowercase hostname when looking for a
stored certificate or calculating a hash.
2024-03-21 15:07:58 +01:00
akallabeth
f98d0dd60a
[crypto,cert] allow NULL certificate
...
If a certificate can not be read and is NULL return NULL for all queries
on that NULL certificate. Fixes #10002
2024-03-21 14:26:37 +01:00
akallabeth
b596ad0d45
[common,settings] accept 'on|off' as bool settings
2024-03-21 14:26:14 +01:00
akallabeth
678ff144ab
[cmake] unify windows resource file generation
...
* use a macro to add resource files for executables and shared libraries
* use that macro to declare targets
* use that macro to set library/binary versioning
* use that macro to set target output name
* use a macro to create manpages and names
2024-03-20 11:17:18 +01:00
akallabeth
f4b7c59915
[cmake] move platform defines to common include
...
* Move platform specific settings to a common CMake include
2024-03-20 09:11:08 +01:00
akallabeth
0106d34636
[core,gatewya] fix function argument type
2024-03-20 08:39:15 +01:00
akallabeth
67eb2fce54
[core,gateway] respect abortEvent
...
in RDG read functions check for rdpContext::abortEvent and terminate
blocking functions if set.
2024-03-20 08:39:15 +01:00
David Fort
64b42be79e
[win32,chilsession] fix path computation in 32 bits
...
The path was not adjusted correctly (wrong WCHAR pointer computation).
2024-03-19 10:18:28 +01:00
Kai Pastor
c8c70ad730
Don't remove duplicate link libs
2024-03-19 08:33:54 +01:00
akallabeth
bcf189b6b3
[codec,rfx] explicitly cast return
...
cast to avoid compilation issues with incompatible-pointer-types
2024-03-18 13:27:32 +01:00
akallabeth
01aef769d6
[core,license] fix incompatible WCHAR pointer
2024-03-18 13:27:32 +01:00
akallabeth
3bba61bdf4
[utils,encoded_types] fix read/write, add limits
...
* fix read and write limits of four byte signed integers
* add definitions for value range MIN and MAX
2024-03-18 08:41:17 +01:00
akallabeth
d919a9e8e7
[utils,test] add TestEncodedTypes
2024-03-18 08:41:17 +01:00
akallabeth
c591c2cd26
[pkg-config] add private optional link libraries
2024-03-14 10:35:03 +01:00
Kai Pastor
9a00f1ed4d
Add Requires.private for libcjson and zlib
2024-03-14 10:13:14 +01:00
Kai Pastor
d6fcacd47a
Add find_dependency for link lib targets
2024-03-14 10:13:14 +01:00
akallabeth
70a8b185be
[core,gateway] log http response status & reason
...
only log headers with debug level and body with trace level.
normal operation does not require this information and will flood the
console.
2024-03-12 17:07:37 +01:00
akallabeth
e31acc048e
[core,client] prevent double channel close
...
reset clientDataCount on close.
2024-03-12 14:24:36 +01:00
akallabeth
2dd80b1e80
[utils] implement write 4byte types
...
* freerdp_write_four_byte_signed_integer
* freerdp_write_four_byte_float
2024-03-11 13:22:12 +01:00
akallabeth
fd46a43934
[core,update] reset invalid regions after BeginPaint
...
Do not touch invalid regions before BeginPaint was called. This fixes
issue #9953 as the sdl client is waiting in BeginPaint for the screen
updates of EndPaint to be actually drawn.
2024-03-11 12:15:52 +01:00
David Fort
a4cc020b75
[win32,childsession] Fix invalid pipe path with 32 bits builds
...
When compiled as x86 (32 bits) the path returned by WinStationCreateChildSessionTransport
is sometime missing the beginning of the pipe path.
2024-03-11 11:24:24 +01:00
akallabeth
4732f379d4
[winpr,sysinfo] unify time function use
...
* Add new function winpr_GetTickCount64NS for high resolution tick
count with (up to) nanosecond resolution
* Add new function winpr_GetUnixTimeNS for high resolution system time
as nanoseconds since 1.1.1970
* Replace use of clock_gettime and gettimeofday in whole project with
these new functions
* Add new macros WINPR_TIME_NS_TO_* and WINPR_TIME_NS_REM_* to convert
the nano second count to less resolution or get the remainder in the
desired resolution
2024-03-11 09:54:10 +01:00
David Fort
b5713c46a7
[win32] various fix for childSession
...
WAIT_TIMEOUT was not correctly handled in non blocking mode. Also there was a
segfault when freeing the transport (double free).
2024-03-09 11:29:08 +01:00
akallabeth
37792c0a37
[ci,primitives] enable NEON on iOS builds
...
* Enable WITH_NEON=ON for iOS builds
* Fix a undeclared variable issue with NEON builds
2024-03-08 14:10:53 +01:00
akallabeth
ef8c9e48e8
[core,utils] unify channel reloading
...
Add the wrapper function utils_reload_channels that unifies the channel
cleanup and channel initialization sequence required on connect,
redirect and gateway policy apply
2024-03-07 16:18:41 +01:00
akallabeth
93eb4df524
[core,gateway] implement RDG and TSG policy
...
* use dynamic logger in RDG
* honor [MS-TSGU] 2.2.9.2.1.5.2 TSG_REDIRECTION_FLAGS
* honor [MS-TSGU] 2.2.10.16 HTTP_TUNNEL_AUTH_RESPONSE
HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS flag
* add setting GatewayIgnoreRedirectionPolicy to ignore the gateway
policy if desired
2024-03-07 16:18:41 +01:00
akallabeth
6a7c375831
[crypto,cert] add better logging of certificate read
...
add missing log entries for possible failures due to invalid data
received. This allows better debugging if a server sends garbage or the
crypto routines have direct RSA routine access disabled.
2024-03-07 14:59:32 +01:00
akallabeth
3b108f1839
[core,proxy] ignore empty variable
...
fixes #9928 : ignore a defined but empty proxy environment variable
2024-03-04 14:28:38 +01:00
David Fort
aebe9742e0
[client,win32] Child session fixes
...
It seems like WaitFor[Single|Multiple]Object calls aren't reliable on pipes, especially
on the pipe opened for childSession access. The object can be marked as signaled even if
no data is available, making the connection laggy and unresponsive (nearly unusable in some
cases).
This patch works around that by using ReadFileEx() with overlapped instead of simple
ReadFile() and use asynchronous reads.
2024-03-01 09:46:53 +01:00
akallabeth
9a7d30d174
[clang,tidy] fix a few warnings
2024-02-27 14:15:43 +01:00
amazingfate
e21afefb86
fix build with openssl < 1.1.1
2024-02-23 12:45:36 +01:00
akallabeth
4b2d877bf3
[core,transport] document and fix transport_attach
...
* [transport_default_attach] Only attach provided socket once the
function can no longer fail
* [transport_attach] document behaviour
2024-02-23 11:02:06 +01:00
Rubycat
3c2c6cc1d5
don't close freerdp_peer underlying socket twice
...
freerdp_peer->Disconnect calls BIO_free which then calls close on the
underlying file descriptor.
Then when freerdp_peer_free is called, the file descriptor is closed
again.
This is problematic if the file descriptor is recycled in between:
thread 1: freerdp_peer_new(42);
thread 1: freerdp_peer->Disconnect() closes 42
thread 2: opens a file with fd 42
thread 1: freerdp_peer_free closes 42
thread 2: uses closed file descriptor 42
2024-02-23 11:02:06 +01:00
akallabeth
05175d70f0
[tests,gdi] skip failing test cases
2024-02-22 12:31:50 +01:00
akallabeth
acedd305d3
fixed unused-but-set-variable warnings
2024-02-22 12:31:50 +01:00
akallabeth
05e555feb7
fixed unused-variable warnings
2024-02-22 12:31:50 +01:00
akallabeth
43eae6029f
[clang-tidy] fix various review warnings
2024-02-22 12:31:50 +01:00
akallabeth
42cfe9bf1a
[cmake,test] deactivate TestGdiLine
...
The test is broken (and has been for a long time), deactivate it.
2024-02-22 12:31:50 +01:00
akallabeth
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +01:00
akallabeth
d76fcd2364
[primitives,opencl] fix alpha handling
2024-02-19 12:29:37 +01:00
akallabeth
1a42cf4f26
[tests,primitives] make error message more verbose
2024-02-19 12:29:37 +01:00
akallabeth
e8194a8fa3
[primitives,opencl] fix warnings
2024-02-19 12:29:37 +01:00
akallabeth
b894199f72
[winpr,collections] add generic string clone functions
...
The ArrayList, HashTable, ... New functions require
void* (*fkt)(const void* ptr) type functions. Provide a generic wrapper
for CHAR and WCHAR strdup to eliminate warnings. Also export a
corresponding free function to avoid issues with runtime
differences.
2024-02-15 11:49:16 +01:00
akallabeth
d0dc657412
[build] delete unused static functions
2024-02-15 11:49:16 +01:00
akallabeth
0e44b2c674
[clang-tidy] clang-analyzer-unix.Malloc
2024-02-15 11:49:16 +01:00
akallabeth
b8598728a6
[clang-tidy] clang-analyzer-core.uninitialized.Assign
2024-02-15 11:49:16 +01:00
akallabeth
81d2c1f057
[clang-tidy] clang-analyzer-core.NullDereference
2024-02-15 11:49:16 +01:00
akallabeth
f69e1fe697
[clang-tidy] readability-duplicate-include
2024-02-15 11:49:16 +01:00
akallabeth
0ba995655d
[clang-tidy] cppcoreguidelines-init-variables
2024-02-15 11:49:16 +01:00
akallabeth
207def5c56
[clang-tidy] readability-isolate-declaration
2024-02-15 11:49:16 +01:00
Martin Fleisz
2e5d4fbe06
gateway: Do not fail if unprocessed padding bytes are detected
...
Sometimes the RPC PDUs have unprocessed data (padding bytes) at their
end. In that case do not fail but just log a warning with the correct
amount of remaining bytes.
2024-02-14 16:25:41 +01:00
akallabeth
db8682648b
Revert "[codec] encode messages considering endianness"
...
This reverts commit 6ba4aad9ab
.
2024-02-09 10:29:08 +01:00
akallabeth
9a51830434
[codec,jpeg] use winpr image for jpeg
2024-02-07 10:04:08 +01:00
David Benjamin
72bc3578a0
clang-format
2024-02-07 07:53:37 +01:00
David Benjamin
7548be62c3
Support RSA-PSS certificates in x509_utils_get_signature_alg
...
RSA-PSS in X.509 is truly horrible, and OpenSSL does not expose very good APIs
to extract this, even though the library does handle it internally. Instead, we
must tediously unwrap RFC 4055's unnecessarily complicated encoding of
RFC 8017's unnecessarily flexible RSA-PSS definition.
2024-02-07 07:53:37 +01:00
David Benjamin
f987e304ee
Add some tests for x509_utils_get_signature_alg
...
Temporarily disable the RSA-PSS tests for now, but this is enough for a
regression test for the previous issue.
2024-02-07 07:53:37 +01:00
David Benjamin
bee7f94e93
[crypto,x509] fix tls-server-end-point signature algorithm selection
...
This reverts commit 00baf58a71
. That
change appears to have been incorrect. It's described as simplying
retrieving the "default signature digest", but it actually changed the
function's behavior entirely. The function wasn't retrieving defaults
previously.
A certificate contains, among other things, a public key and a
signature. The public key is the public key of the subject. However, the
signature was generated by the issuer. That is, if I get a certificate
from a CA, the public key will be my public key and the signature will
be my CA's signature over the certificate contents.
Now, the original code returned the digest used in the certificate's
signature. That is, it tells you which signature algorithm did my *CA*
use to sign my certificate.
The new code extracts the certificate's public key (my public key, not
the CA's). This doesn't necessarily tell you the signature algorithm, so
it then asks OpenSSL what the "default" signature algorithm would it use
with the key. This notion of "default" is ad-hoc and has changed over
time with OpenSSL releases. It doesn't correspond to any particular
protocol semantics. It's not necessarily the signature algorithm of the
certificate.
Now, looking at where this function is used, it's called by
freerdp_certificate_get_signature_alg, which is called by
tls_get_channel_binding to compute the tls-server-end-point channel
binding. That code cites RFC 5929, which discusses picking the hash
algorithm based on the certificate's signatureAlgorithm:
https://www.rfc-editor.org/rfc/rfc5929#section-4.1
That is, the old version of the code was correct and the
"simplification" broke it. Revert this and restore the original version.
I suspect this went unnoticed because, almost all the time, both the old
and new code picked SHA-256 and it was fine. But if the certificate was,
say, signed with SHA-384, the new code would compute the wrong channel
binding.
2024-02-07 07:53:37 +01:00
akallabeth
2fffcd64b9
[winpr] use winpr_strerror instead of strerror
...
use the wrapper from WinPR to use the best implementation available.
2024-02-06 15:45:47 +01:00
akallabeth
ba8cf8cf21
[build] fix Wmismatched-deallocator warnings
...
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
Isaac Klein
763462d0a9
include null byte in Authorization Request PDU
...
The RDS AAD Auth PDUs have no packet headers to indicate length.
Instead, these packets are zero-terminated strings. Somehow, Windows
accepts Authentication Request PDUs without a terminating null byte
during regular connections, but not through WVD websocket gateways.
2024-02-04 13:00:48 +01:00
akallabeth
bb42d425ed
[gcc,clang] add support for attribute(malloc)
...
Mark all malloc like functions and add their appropriate free function
to let the compiler complain on mismatches
2024-02-02 15:10:40 +01:00
Vic Lee
5559e59f40
[channels] Add synchronous static channel setting.
2024-02-01 15:06:23 +01:00
akallabeth
e067e9dc6d
[core,peer] fix typo
2024-01-29 11:52:22 +01:00
akallabeth
2cd64ba424
[cmake] fallback cJSON detection
2024-01-29 09:34:59 +01:00
akallabeth
cefe847683
[core,gateway] use FREERDP_USER_AGENT define
...
Define FREERDP_USER_AGENT in version.h to be used by gateway http user
agent
2024-01-29 08:46:29 +01:00
Vic Lee
f2794daf38
[core,transport] make blocking mode available to transport IO interface.
2024-01-22 12:57:01 +01:00
akallabeth
575d42312a
[code] improve error checks on free
2024-01-19 09:57:41 +01:00
Armin Novak
db73c562a2
[core,gcc] split update of RDP encryption from gcc
...
* Update EncryptionLevel and EncryptionMethods before writing GCC data
* Use const rdpSettings* in all GCC write functions
2024-01-19 06:51:30 +01:00
Armin Novak
939e922936
[codec,planar] check resolution for overflow
...
If the codec resolution is too large return an error as the internal
buffers would otherwise overflow.
2024-01-16 09:02:58 +01:00
akallabeth
a842350177
[core,license] improve logging of failures
...
* ensure every failure path writes an appropriate log message
* fix compiler warnings (integer sizes, ...)
2024-01-15 13:13:42 +01:00
akallabeth
c303e4e8b9
[core,security] ensure length, log failures
2024-01-15 13:13:42 +01:00
akallabeth
55f200f1b5
[core,tpkt] log too large tpkt stream length
2024-01-15 13:13:42 +01:00
akallabeth
d5eecda8a3
[crypto,cert] log if empty certificate is read
2024-01-15 13:13:42 +01:00
Vic Lee
16206cb505
[channels,drdynvc] Add settings to enable synchronous dynamic channels.
2024-01-11 15:24:55 +01:00
akallabeth
0e828bd657
[core,peer] properly handle out of sequence PDU
...
If the peer state machine is in state
CONNECTION_STATE_CAPABILITIES_EXCHANGE_MONITOR_LAYOUT properly check for
available data. If a PDU was received in this state it is an out of
sequence PDU (that might happen during deactivation/reactivation) and
must be parsed.
2024-01-10 08:27:14 +01:00
akallabeth
a612463c96
[core,peer] improve logging
...
log unhandled data in peer_recv_callback as warning if the loop
terminates.
2024-01-10 08:27:14 +01:00
akallabeth
2e42d8ac2b
[core,connection] add more logging
...
log peer->ClientCapabilities execution failures
2024-01-10 08:27:14 +01:00
akallabeth
af9e74273d
[common,assist] improve test to cover full parsing
2024-01-09 15:18:37 +01:00
akallabeth
c2f4ad80a5
[common,settings] fix TargetNetAddresses usage
...
* use a common function to allocate both, TargetNetAddresses and
TargetNetPorts
* unify handling, utilize helper functions as much as possible
2024-01-09 15:18:37 +01:00
akallabeth
f6a208f75e
[cmake] generate relative pkgconfig path
...
generate the relative pkgconfig path from the actual install locations.
fixes #9718
2024-01-05 14:19:34 +01:00
akallabeth
fbc25978ae
[common,assist] fix file parser ( Fixes #9726 )
...
* only append N or U entry if it was found
* append port for N and U entries
2024-01-04 10:50:12 +01:00
Vic Lee
33447dc16e
[nla,transport] move public key retrieval to transport IO.
2024-01-03 08:40:39 +01:00
Armin Novak
bb8c08f06e
[build,mingw] rename variable interface
...
interface is a reserved keyword with mingw, breaking compilation.
2023-12-21 07:11:12 +01:00
Armin Novak
6c26980585
[core,server] lock FreeRDP_WTSVirtualChannelWrite
...
* FreeRDP_WTSVirtualChannelWrite might be called from different threads,
so lock the function execution to keep split packets in order
* unify DVC and SVC channel creation/deletion to avoid duplicate code
2023-12-20 11:26:54 +01:00
Armin Novak
b02d4a81b5
[core,update] reset invalid regions at BeginPaint
...
The client must handle graphics updates in EndPaint.
If we already reached BeginPaint again reset the invalidated regions
as they are already processed and start anew. Fixes #9672
2023-12-20 09:28:53 +01:00
Armin Novak
0af308c1b5
[core,test] adjust TestConnect timeouts
...
when run on qemu systems for alternate architectures we need to lower
our speed expectations and increase the failure timeouts
2023-12-20 09:03:58 +01:00
Armin Novak
f9a4bd44ba
[codec,test] better error logging for progressive
2023-12-20 09:03:58 +01:00
Armin Novak
9575f386cd
fixed WCHAR constants, use endian safe definitions
2023-12-20 09:03:58 +01:00
Armin Novak
10e3942993
[primitives] skip benchmarking if only one available
2023-12-20 07:27:43 +01:00
Armin Novak
198774c035
[compat,libressl] fix compilation issues
2023-12-19 20:44:39 +01:00
David Fort
6a31820363
[core] allow to specify the hostname used for AAD
...
The previous code was assuming that the host name used for doing AAD was
ServerHostname parameter. But when you connect directly to Azure hosts you most
likely connect by IP and use short name for the AAD host, so you need to be able
to give ServerHostname=<IP of host> and AadServerHostname=<shortname>.
2023-12-15 14:37:15 +01:00
Armin Novak
9b7fa92521
[libfreerdp] prefer opus CMake file over pkg-config
2023-12-14 14:05:39 +01:00
Armin Novak
3043fca91d
[warnings] fixed -Wdiscarded-qualifiers
2023-12-13 13:24:22 +01:00
Armin Novak
cce3253fdf
[warnings] fixed -Wincompatible-pointer-types
2023-12-13 13:24:22 +01:00
Armin Novak
678b392e89
[warnings] fixed -Wformat
2023-12-13 13:24:22 +01:00
Armin Novak
d6b7cfc1c2
[warnings] fixed -Wpointer-sign
2023-12-13 13:24:22 +01:00
Armin Novak
7c1d83445e
[common,addin] fix -Wstringop-overread warning
2023-12-13 13:24:22 +01:00
Armin Novak
5638b5061c
[core] fixed -Wenum-int-mismatch
2023-12-13 13:24:22 +01:00
Pascal Nowack
be660a91ca
utils/encoded_types: Get rid of implicit conversion warnings
...
The compiler may complain with a 'implicit conversion changes
signedness' warning. Get rid of these warnings by explicitly
casting the respective values before shifting them.
2023-12-13 13:24:22 +01:00
Pascal Nowack
24722bd65c
utils/encoded_types: Get rid of unhandled enumeration values warning
2023-12-13 13:24:22 +01:00
Armin Novak
adb5e5715b
[cache,glyph] print warning if enabled
...
glyph-cache is buggy, warn if enabled.
2023-12-12 19:36:54 +01:00
Vic Lee
97ef5d09e9
[core,crypto] fix missing OpenSSL includes.
2023-12-11 08:51:59 +01:00
Armin Novak
468106033f
[core,capabilities] disable surface command
...
if the remote end does not support fastpath disable surface commands.
2023-12-06 20:14:02 +01:00
Armin Novak
c8b142a10f
[core,gcc] added flag RNS_UD_CS_RELATIVE_MOUSE_INPUT
2023-12-06 10:45:01 +01:00
Armin Novak
195d665af6
[core,caps] added rdp_input_flag_string
2023-12-06 10:45:01 +01:00
Armin Novak
c7fec578a7
[core,input] fix function argument sign
2023-12-06 10:45:01 +01:00
akallabeth
78d736b481
[gdi,graphics] fix glyph bounds #9454
2023-12-01 10:18:33 +01:00
Armin Novak
a7200699f4
[core,gateway] do not pack RPC_FAULT_CODES
2023-11-30 12:43:03 +01:00
Stefan Heinzel
52606929fb
5726 add vsock support for client and server
2023-11-29 15:12:51 +01:00
Armin Novak
6642192228
[common,settings] fix pointer copy
2023-11-28 16:25:11 +01:00
David Fort
079731068c
[core] fix freezing connection to childSession
...
When connecting to child session(or a VM), we have CredSSP/Nego/ActivationSequence
instead of Nego/CredSSP/ActivationSequence. Before the patch, we were not applying
flags read in the NegoResponse to the settings and that was leading to FreeRDP
thinking that the remote server was not supporting EXTENDED_CLIENT_DATA_SUPPORTED.
That was later preventing some GCC blocks to be sent, and make the server unhappy
and freeze the connection.
2023-11-28 13:28:08 +01:00
akallabeth
1b31852d32
[git] remove .gitignore
...
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
Armin Novak
1ef7b9e3e0
[codec,dsp] fix ffmpeg deprecation warning
2023-11-24 21:23:38 +01:00
Armin Novak
492cbc8e6f
[opaque_settings] reorder internal includes
...
order is important for internals, as the deprecation warnings are
deactivated for this use case
2023-11-24 21:23:38 +01:00
akallabeth
737cd9b8f6
[warnings] Wshadow, uninitialized variables
2023-11-24 18:19:03 +01:00
akallabeth
c78e466be1
[warnings] fixes Wunused-variable
2023-11-24 18:19:03 +01:00
akallabeth
6b9245849c
[warnings] type casts
2023-11-24 18:19:03 +01:00
akallabeth
5dd12c5b1b
[codec,dsp] mark fallthrough
2023-11-24 18:19:03 +01:00
akallabeth
dd2d110870
[warnings] fix -Wcast-qual
2023-11-24 18:19:03 +01:00
akallabeth
ceb7bd1d41
[warnings] fixed clang build warnings
2023-11-24 18:19:03 +01:00
Armin Novak
8e7561534e
update settings
2023-11-24 14:54:56 +01:00
Armin Novak
4d50d59e7e
[settings] renamed VirtualChannelCompressionFlags
2023-11-24 14:54:56 +01:00
Armin Novak
37bd7e0959
[settings] renamed VirtualChannelChunkSize
...
in [MS-RDPBCGR] it is named VCChunkSize
2023-11-24 14:54:56 +01:00
Armin Novak
3e9aad58f9
[common,settings] add documentation and missing API
...
* added freerdp_settings_are_valid for batch checks
* added missing settings function documentation
2023-11-24 14:54:56 +01:00
akallabeth
093d722447
[settings] assert invalid keys in getter
2023-11-24 14:54:56 +01:00
Armin Novak
704ee8bc4b
[settings] add unused values and sign correct keys
...
* add -1 as unused enum entry
* change key parameter type from size_t to SSIZE_T
2023-11-24 14:54:56 +01:00
Armin Novak
6e6559c41a
[settings] fix type mismatch warnings
2023-11-24 14:54:56 +01:00
Armin Novak
cda6239119
[settings] update generated settings helper
2023-11-24 14:54:56 +01:00
Armin Novak
593e2bf4a9
[api] fix compiler warnings
...
check #if defined(__GNUC__)
2023-11-24 14:54:56 +01:00
akallabeth
cd4d77af86
[settings] add deprecation warnings
...
direct struct access to rdpSettings now produces warnings if not
explicitly deactiaved by defining FREERDP_SETTINGS_INTERNAL_USE
2023-11-24 14:54:56 +01:00
akallabeth
130501fcd5
[core,bitmap] make settings opaque
2023-11-24 14:54:56 +01:00
akallabeth
f068b6fc99
[utils,smartcard] make settings opaque
2023-11-24 14:54:56 +01:00
akallabeth
1163cc4d5c
[core] add internal settings.h include
2023-11-24 14:54:56 +01:00
akallabeth
82eefe0bd1
[settings] auto generate key types from struct
...
* use enum types for settings getter/setter to have compiler check if
keys are valid
* generate enum types from struct at compile time
* CMake option WITH_OPAQUE_SETTINGS to hide rdpStruct implementation
from external projects
2023-11-24 14:54:56 +01:00
akallabeth
fc79519741
[settings] clean up string helper
2023-11-24 14:54:56 +01:00
akallabeth
71a7ffa8d8
[settings] add freerdp_settings_append_string
...
this function appends a string to an existing values, takes care of
memory allocations.
2023-11-24 14:54:56 +01:00
akallabeth
a9a879c59f
[settings] remove freerdp_settings_take_string
...
this function is problematic as it allows mixing allocators.
2023-11-24 14:54:56 +01:00
akallabeth
ecc21a2cfc
[settings] add freerdp_settings_copy_item
...
convenience function to copy a value of opaque type from one settings
struct to another, cleaning up possible existing data first
2023-11-24 14:54:56 +01:00
Armin Novak
1048ad4003
[scard] allow INFINITE timeout
2023-11-21 15:54:01 +01:00
akallabeth
84c3e5b027
[cmake] fix pkg-config check
2023-11-21 14:29:47 +01:00
Pascal Nowack
9c3dfefb7f
codec/dsp: Also set bitrate for Opus encoder
2023-11-21 14:29:47 +01:00
akallabeth
26e003ce05
[codec,dsp] experimental opus encoder
2023-11-21 14:29:47 +01:00
akallabeth
c2c40ae2ff
[codec,dsp] initial support for ffmpeg/opus
2023-11-21 14:29:47 +01:00
akallabeth
7a05d85a7f
[codec,dsp] unify opus sample rate check
2023-11-21 14:29:47 +01:00
akallabeth
a232cec690
[codec,dsp] fix opus related code
...
* proper library detection
* default to NOT WITH_DSP_FFMPEG
* disable if WITH_DSP_FFMPEG
2023-11-21 14:29:47 +01:00
Pascal Nowack
330f7ae0a2
codec/dsp: Add support for decoding Opus encoded streams
...
The Opus codec is a modern free audio codec, that is also royalty-free.
Adding support for it will allow clients and servers supporting it to
transfer audio in similar efficient way like with AAC.
So, add support it.
2023-11-21 14:29:47 +01:00
akallabeth
3ca26384ee
[core] only move state on demand active
...
rdp_client_connect_demand_active returns STATE_RUN_ACTIVE if we received
it, some other return otherwise
2023-11-21 13:54:29 +01:00
akallabeth
0ee61dcb62
[core,connection] improve parsing of demand active
...
Split up parsing, so we don´t have to reread the data.
2023-11-21 13:54:29 +01:00
akallabeth
e3a84921de
[core,gateway] fix TSG_PACKET_TYPE_QUARENC_RESPONSE
...
parsing of TSG_PACKET_TYPE_QUARENC_RESPONSE was incomplete, fix that
2023-11-20 18:00:42 +01:00
Armin Novak
e451b4cad1
[core,gateway] rpc use generated session id
2023-11-20 18:00:42 +01:00
Armin Novak
7d02a97a88
[core,gateway] change type of GUID arguments
...
use const GUID* for GUID strings and format the string internally
2023-11-20 18:00:42 +01:00
Armin Novak
e62e1dbbaf
[core,gateway] add RDG-Correlation-Id
...
implement [MS-TSGU] 2.2.3.2.2 RDG-Correlation-Id
2023-11-20 18:00:42 +01:00
Armin Novak
148e61606a
[core,gateway] silence reading of rts signature
...
sometimes we just try to read the signature and do not want errors
logged.
2023-11-20 18:00:42 +01:00
Armin Novak
99f3a9c0e6
[core,gateway] add rts_recv_ping_pdu
2023-11-20 18:00:42 +01:00
Armin Novak
f367465485
[core,gateway] improve rpc logging
2023-11-20 18:00:42 +01:00
Armin Novak
9fcde2db74
[core,gateway] removed duplicate vc_state_str
2023-11-20 18:00:42 +01:00
Armin Novak
8990ffefca
[core,gateway] rpc dynamic logger
2023-11-20 18:00:42 +01:00
Armin Novak
36647567ac
[core,gateway] fix parsing of RTS PDU
...
* [MS-RPCH] 2.2.4.51 FlowControlAckWithDestination RTS PDU
2023-11-20 18:00:42 +01:00
Armin Novak
814ab2a212
[core,gateway] use dynamic logger in tsg
2023-11-20 18:00:42 +01:00
Armin Novak
6e7a35f8bc
[core,gateway] log rts_recv_out_of_sequence_pdu
2023-11-20 18:00:42 +01:00
Armin Novak
a0db106306
[core,gateway] add vc state logging
2023-11-20 18:00:42 +01:00
Armin Novak
fac9fa5f90
[core,gateway] add rpc stringify functions
2023-11-20 18:00:42 +01:00
Armin Novak
60ceff95c5
[fflush] remove of unnecessary fflush
2023-11-20 18:00:42 +01:00
Armin Novak
cf76e70e85
[core,gateway] fix rts_read_auth_verifier_with_stub
...
check offset against fragment size, not remaining size
2023-11-20 18:00:42 +01:00
Armin Novak
65d3c6fe9b
[core,gateway] update tsg parsing
2023-11-20 18:00:42 +01:00
Armin Novak
135c4cc78c
[core,gateway] try to parse remaining RPC PDU
...
if not all bytes have been parsed, try parsing again
2023-11-20 18:00:42 +01:00
Armin Novak
230563b337
[core,gateway] log incomplete parsed RPC PDU
2023-11-20 18:00:42 +01:00
Armin Novak
d36adb2654
[core,gateway] fix RTS_PDU_PING handling
...
ping messages might occur before connection is fully established, so
reply to incoming ping. Fixes #9505
2023-11-20 18:00:42 +01:00
Armin Novak
1807652975
[core,helpers] add new stringify functions
...
* freerdp_get_logon_error_info_type_ex
* freerdp_get_logon_error_info_data_ex
2023-11-20 18:00:42 +01:00
Armin Novak
957ec80443
[core,gatewayay] improve rpc error logging
2023-11-20 18:00:42 +01:00
David Fort
061148f856
[nla] initial server-side remote credential guard support
...
Adds support for server-side remote credential guard in NLA. When enabled that allows
the remote user to connect without shipping credentials in TSCred packets. Instead
it will send his TGT encoded with a TGS from the remote server. This way the server
is able to populate that TGT in a local credential cache without knowing the user's
password.
The patch only treats the NLA part and does not contain the associated RDPEAR channel
that allows to have the complete interaction to retrieve new access tokens.
2023-11-20 16:17:00 +01:00
akallabeth
20f09b2d34
[codec,aac] add NaN filter
...
ffmpeg format conversion from int16 to float sometimes produces values
that are NaN or Infinity.
Replace these values as these input values break the AAC encoder
2023-11-20 14:22:26 +01:00
akallabeth
694d95a58b
[utils,smartcard] fix reading of context ref
...
unify read of context and context pointer data for all calls.
fixes #9480
2023-11-07 16:07:17 +01:00
Armin Novak
98a4eb77ef
[core] VirtualChannelChunkSize adjustments
...
* add CHANNEL_CHUNK_MAX_LENGTH
* remove duplicate definitions
* default to CHANNEL_CHUNK_MAX_LENGTH
2023-11-03 12:43:25 +01:00
Armin Novak
e56fcb45cb
[core,aad] move cJSON related parsing to core
...
hide cJSON parser from freerdp-client library, link privately
2023-11-02 11:30:55 +01:00
Armin Novak
32c65dbdfc
[crypto,tls] only print fingerprint in log
...
printing the whole PEM to log is too verbose, just use the fingerprint
instead.
2023-10-25 13:15:35 +02:00
David Fort
60ea534ccd
[core] fix marshalling of DynamicTimeZone
...
The field is an UTF16 field, the length was announced as the length of the
UTF8 string.
2023-10-24 12:42:10 +02:00
akallabeth
0b018057b5
[core,input] use time() instead of timespec_get
...
android only supports the latter with API >= 29
2023-10-19 16:37:28 +02:00
Mariusz Bialonczyk
1d1171489f
[tools] update-settings-tests, update-rdpSettings, clang-format
2023-10-19 16:37:28 +02:00
Mariusz Bialonczyk
550ba7fe34
[libfreerdp] final freerdp_prevent_session_lock() implementation
...
Injects fake mouse movement when idle
2023-10-19 16:37:28 +02:00
Mariusz Bialonczyk
90f82bf418
[input] call input_update_last_event() when desired
2023-10-19 16:37:28 +02:00
Mariusz Bialonczyk
21f7bd37cf
[input] input_update_last_event() and variables
2023-10-19 16:37:28 +02:00
akallabeth
9ebbefa5fe
[settings] remove unused extensions
...
The extensions from the unstable API zone were unused, so remove them
2023-10-19 14:22:19 +02:00
akallabeth
4d99b4ff9b
[settings] add ClipboardUseSelection
2023-10-19 14:22:19 +02:00
Pascal Nowack
9835a916ae
settings: Add missing to_string() case for RDP_VERSION_10_12
2023-10-19 04:47:53 +02:00
Pascal Nowack
038660949c
settings: Fix wrong version string
2023-10-19 04:47:53 +02:00
akallabeth
1d21c0c609
[warnings] properly cast constants to char
2023-10-17 11:07:11 +02:00
Pascal Nowack
5ec5be7ac4
utils: Add helper functions to parse encoded types into regular ones
...
Some virtual channels, like the location channel use encoded types to
lower the bandwidth usage.
Add common helper functions, so that each virtual channel doesn't have
to reimplement the parser functions again and again.
2023-10-17 10:18:08 +02:00
David VERON
63e1863c9a
fixes rdp_read_info_null_string api
...
Removed buggy "isNullTerminated" parameter, as RDP specs tells
that cbLen includes the nullTerminator if there is one.
2023-10-16 15:18:52 +02:00
Armin Novak
60390ea40c
[pragma] unify compiler diagnostics
2023-10-16 15:10:13 +02:00
Armin Novak
c91a250623
[warnings] add WINPR_FORMAT_ARG
...
with WINPR_FORMAT_ARG format strings are marked for MSVC to avoid
warnings
2023-10-16 15:10:13 +02:00
Armin Novak
53b65ff7bd
[documentation] fix Wdocumentation warnings
2023-10-16 15:10:13 +02:00
Armin Novak
07543a6042
[warnings] fix various warnings
...
* missing const in casts
* missing static for functions
* missing WINPR_ATTR_FORMAT_ARG for printf like functions
2023-10-16 15:10:13 +02:00
Armin Novak
4778203340
[restrict] remove from in/out buffers
2023-10-16 15:10:13 +02:00
Armin Novak
fe28f9ed9c
[keyword,restrict] do not use for shift operations
...
shifting operations are done on a in/out buffer, so the restrict keyword
is not appropriate for that.
2023-10-16 15:10:13 +02:00
Armin Novak
138d3df028
[core,gcc] parse CS_UNUSED1 message
...
parse message to avoid log entries server side for this kind of PDU
2023-10-13 16:05:27 +02:00
akallabeth
4df4404faa
[core,input] add qoe event handling
2023-10-13 16:05:27 +02:00
akallabeth
20e15ac326
[core] added relative mouse event support
2023-10-13 16:05:27 +02:00
akallabeth
1f7bc15bb1
[settings] add HasQoeEvent
2023-10-13 16:05:27 +02:00
akallabeth
910e3b9fb4
[settings] added new setting for HasRelativeMouseEvent
2023-10-13 16:05:27 +02:00
akallabeth
002b27f2e5
[core] add RDP_VERSION_10_12
2023-10-13 16:05:27 +02:00
akallabeth
80122c1784
[core,aad] cast constants to DWORD
2023-10-10 22:59:53 +02:00
akallabeth
8be124b4a2
[codec,rfx] revert removal of rfx_message_get_frame_idx
2023-10-10 19:35:27 +02:00
akallabeth
d44f9528a1
[ssl] use proper names for TLS_*_method
...
only use deprecated SSLv23_*method on old versions of SSL
2023-10-10 19:35:27 +02:00
akallabeth
89429885a0
[cmake] make generated pkg-config files relocatable
...
* new CMake option PKG_CONFIG_RELOCATABLE (default ON) allows generating
traditional or relocatable pc files
2023-10-10 19:35:27 +02:00
David Fort
a8c5926154
[server,drdynvc] use a hashtable for dynamic channels instead of an arrayList
...
This speeds up all operations around dynamic channels.
2023-10-09 10:47:34 +02:00
akallabeth
a41360e3b0
[codec,rfx] added missing RFX encoder API calls
2023-10-07 21:26:27 +02:00
David Fort
ff303a9bda
[core,nla] Inject received TSCredentials in the peer's settings
...
The RDP client sends TSCredentials so that the server can reuse these credentials. This
patch stores these values in the peer's rdpSettings in the corresponding fields.
It handles TSPasswordCreds for user/domain/password connection but also TSSmartCardCreds
when the users has connected with a smartcard.
2023-10-04 09:22:49 +02:00
Martin Fleisz
9cff6e9366
locale: Fix X11 keyboard layout detection
...
This fixes an issue with keyboard layout detection reintroduced in #8960
The problem has already been fixed in #6688 but got lost after
refactoring.
The issue is that the layout specifier might be a comma separated list
with country specifiers i.e. `"at,us"` which was not correctly handled.
2023-09-28 21:16:17 +02:00
David Fort
3c18a9980f
[client,win32] implement connection to child session
...
Under windows you can connect to a child session by requesting a named pipe to
the local server, and then do some RDP on this named pipe.
The protocol is like for /vmconnect with CredSSP, then Nego and then the "normal"
workflow for a connection. For CredSSP we force the usage of NTLM for the Negociate
SSPI, and the credentials are empty.
2023-09-27 11:57:49 +02:00
David Fort
0638c382f9
[core,nla] correctly print the value of earlyUserAuth
...
The log was printing the previous value instead of the value that is set.
2023-09-27 11:57:49 +02:00
akallabeth
86acc8d31a
[warnings] fixed reserved-identifer warnings
2023-09-25 08:39:01 +02:00
akallabeth
0595f2f7fe
[core,gateway] fix tautological check in arm
2023-09-21 10:57:43 +02:00
akallabeth
0b7b8445bc
[codec,ncrush] fix const correctness of pointer
2023-09-21 10:57:43 +02:00
akallabeth
635626be12
[client,common] avd related keys to rdp file parser
2023-09-21 10:30:09 +02:00
akallabeth
7746c8f4ae
[core,orders] fix #9402 polyline order processing
2023-09-21 10:00:19 +02:00
akallabeth
1d25242eac
[core,transport] fix evaluation of nla errors
...
if there is no rdpNla fall back to default error password expired.
2023-09-21 10:00:19 +02:00
akallabeth
b9fdd88bd7
[crypto,tls] reset tls context before setting
...
clean up old tls context before setting a new one
2023-09-21 10:00:19 +02:00
akallabeth
9a460d38fc
[crypto,tls] free tls bindings before set
...
Free possibly allocated bindings before setting new ones
2023-09-21 10:00:19 +02:00
akallabeth
d275e083ec
[crypto,tls] free existing public key
...
before updating the public key free possible existing data.
2023-09-21 10:00:19 +02:00
akallabeth
5a7a1c159d
[casts] remove fnObject* function pointer casts
...
use proper types that match the function pointer definition to avoid
surprises if the code should be refactored
2023-09-20 21:11:30 +02:00
akallabeth
a546388063
[gdi,line] clean up line functions
...
* Simplify CMake source detection
* Clean up code in line.c, add assertions
2023-09-20 09:53:49 +02:00
akallabeth
e5ad90627b
[gateway,arm] fix abort condition for retries
2023-09-20 09:29:45 +02:00
akallabeth
c1db0029d9
[core,update] fix possible leak on gdi reset
2023-09-20 09:29:45 +02:00
Armin Novak
6399635abf
[core] fix leaks reported in #9400
2023-09-19 09:35:52 +02:00
David Fort
190ecf640f
[drdynvc] improvements of server-side DRDYNVC
...
This patch prepares the reading of the dynamic channel version so that next we
can take in account this to take advantage of advanced features in last versions
(compressions or priorities).
The patch also implement notifying the VCM event when the dynamic channel becomes ready
so that users of FreeRDP can just do calls to WTSVirtualChannelManagerGetDrdynvcState
when the channel event is set (no blind calls).
2023-09-18 13:05:44 +02:00
Armin Novak
79da16244e
[codec,progressive] fix overlapping buffers
2023-09-15 11:24:21 +02:00
Armin Novak
4152ce5dee
[gateway,arm] fix input string length check
2023-09-15 11:24:21 +02:00
akallabeth
be7f2979ee
[gateway,http] const correct HttpResponse
2023-09-14 17:38:08 +02:00
akallabeth
bd595d363d
[arm] add retry callback for transport
...
If the connection is blocked due to some VM requiring spinup time before
being ready to use call the newly created callback RetryDialog.
2023-09-14 12:02:26 +02:00