akallabeth
605395028c
[server,proxy] remove sample config.ini
...
the sample can be dynamically generated by proxy binary, do not leave an
(outdated) config example in the repo.
2024-07-01 09:58:45 +02:00
Armin Novak
2c4604ed1c
[proxy,modules] replace global constructor
2024-06-05 15:57:46 +02:00
akallabeth
a403b3bd1c
[server,proxy] add missing WINPR_NORETURN
2024-05-08 14:53:39 +02:00
akallabeth
1197384315
[coverity] 1543218 Resource leak
2024-04-11 12:04:07 +02: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
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +01:00
akallabeth
0e44b2c674
[clang-tidy] clang-analyzer-unix.Malloc
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
akallabeth
b193f9ab59
[cmake] guard cmake_policy(CMP0091)
...
only set the policy to NEW if it is defined
2024-02-13 16:22:37 +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
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
Armin Novak
a4425d945c
[server,proxy] drop capture plugin
...
the capture plugin was written for FreeRDP2 proxy, which used a
different approach that is no longer working with FreeRDP3.
Drop the module so that we don´t diffuse people into thinking that this
is working.
2024-01-18 11:20:29 +01:00
Armin Novak
b4587efad1
[proxy,modules] fix module load check
2024-01-17 11:31:13 +01:00
akallabeth
59ed125eed
[server,proxy] add TlsSecLevel option to config
...
To support legacy targets add the TlsSecLevel configuration option that
is equivalent to the /tls:seclevel option of the client implementations.
This allows automatic configuration of OpenSSL legacy providers if they
are available.
2024-01-09 15:53:22 +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
Armin Novak
a7decba8c2
[cmake] unify common options
2023-12-22 16:21:30 +01:00
Armin Novak
7debd0f621
[cmake] set policy 0091
...
On windows we need to set the runtime linker settings extra
https://cmake.org/cmake/help/latest/policy/CMP0091.html
2023-12-22 15:37:56 +01:00
Armin Novak
175a3ca09a
[cmake] do not append EXECUTABLE_SUFFIX to OUTPUT_NAME
2023-12-22 15:37:56 +01:00
Armin Novak
7d641a67b9
[doc,manpage] name manpages versioned
...
if WITH_BINARY_VERSIONING is activated also version the manpages to
match the binary names
2023-12-22 10:24:09 +01:00
Armin Novak
b1cb6b3efc
[server,proxy] update manpage with config steps
2023-12-22 10:24:09 +01:00
Armin Novak
b04271ae2d
[cmake] add executable versioning
...
optionally append API version to generated binaries
2023-12-21 18:56:51 +01:00
Armin Novak
7f25a7cebf
[cmake] provide default project version
...
each subproject inherits the project version of the top level project
2023-12-21 18:56:51 +01:00
Armin Novak
07d7d35731
[server,proxy] add manpage
2023-12-20 09:21:31 +01:00
Armin Novak
a446c53ef3
[freerdp,proxy] add version command
2023-12-20 09:21:31 +01:00
Joan Torres
2079455eec
[proxy,modules] allow compiling with old c++ compiler
...
For dyn-channel-dump.
On C++17 there's the filesystem standard library.
Newer c++ compilers use it with <filesystem>.
However, older c++ compilers use it with <experimental/filesystem>.
2023-12-18 14:11:37 +01:00
Armin Novak
f791cf6308
[proxy,modules] explicitly build shared libraries
...
The proxy modules must always be shared libraries. To have the proper
system extension, use keyword SHARED instead of MOUDLE
2023-12-14 14:05:39 +01:00
akallabeth
6eb4ff6212
[server,proxy] fix pf_context_copy_settings
...
possible memory leaks in failure case fixed
2023-11-24 14:54:56 +01:00
Armin Novak
6e6559c41a
[settings] fix type mismatch warnings
2023-11-24 14:54:56 +01:00
akallabeth
1f236ade7a
[server] make settings opaque
2023-11-24 14:54:56 +01:00
Armin Novak
e0e72f9c28
[cmake] use CMAKE_MSVC_RUNTIME_LIBRARY
...
* Increase required CMake version to 3.15 (windows only)
* Use
https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html#prop_tgt:MSVC_RUNTIME_LIBRARY
to select windows runtime
2023-11-16 10:40:04 +01:00
Armin Novak
e622e26c70
[server,proxy] fix install location of proxy library
2023-11-02 11:30:55 +01: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
akallabeth
7df03ed5b4
[server,proxy] fix function pointer warning
2023-09-25 08:39:01 +02:00
akallabeth
6ff4db76bd
[server,proxy] fix function pointer type warning
2023-09-25 08:39:01 +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
7a71441476
[warnings] fix integer multiplications
...
Ensure the integer width for size arguments is 64bit in a
multiplication. Leading 64bit constant 1ull expands width, a trailing
one is ignored.
2023-08-22 11:55:00 +02:00
Armin Novak
c0df9a50e5
[proxy,drdynvc] fix #9303 broken format string
2023-08-21 10:42:33 +02:00
akallabeth
41bd8bd3fb
[various] fix integer conversions
2023-08-04 15:07:56 +02:00
Kai Pastor
5ecc011c13
Export interface include directories
2023-08-01 11:12:46 +02:00
ehdgks0627
d04ba8d6ef
Correct typos and formatting errors in format strings
...
In several files, fixed typos in format strings that were causing unexpected output and formatting issues.
2023-07-28 15:34:46 +02:00
Armin Novak
3df928a8d2
[client,sdl] fixed member initialization order and casts
2023-07-28 13:42:12 +02:00
Armin Novak
e61880d077
[standard] replace __FUNCTION__ with __func__
2023-07-27 20:02:43 +02:00
akallabeth
764936fe64
[proxy,modules] fix c++ 11 compatibility
2023-07-05 08:46:00 +02:00
akallabeth
c7f7f38367
[ci] deactivate proxy modules on windows
...
current builder is too old for c++11
2023-07-05 08:46:00 +02:00
akallabeth
fc1238a8da
[proxy,module] fix missing library linking
2023-07-05 08:46:00 +02:00
akallabeth
be7ff37069
[proxy,rdpdr] fix boroken logger calls
2023-06-29 21:06:47 +02:00
akallabeth
2ac8946950
[proxy,channels] drdynvc logging context
...
* Use a dynamic logger for dynamic proxy channel
* Set logger context for dynamic channel
2023-06-29 14:30:09 +02:00
akallabeth
ead2be382c
[proxy,channels] use logger context for rdpdr
2023-06-29 14:30:09 +02:00
Armin Novak
133585cd5e
[proxy,drdynvc] remove dynamic channels on open
...
dynamic channels can be opened at any time during a session. If we
receive a CREATE_REQUEST_PDU and the channel id is already in use, print
out a warning with the existing channel details and discard it before
creating the newly requested channel.
2023-06-29 11:05:37 +02:00
Armin Novak
1dfe7878f6
[proxy,module] always check path exists for dyn-channel-dump
2023-06-29 11:05:37 +02:00
Armin Novak
ceb346241b
[proxy,modules] add dump session handling
...
Use a new subdirectory for each session opened on the proxy
2023-06-29 11:05:37 +02:00
Armin Novak
ed93474a07
[proxy,modules] dyn-channel-dump one packet per file
2023-06-29 11:05:37 +02:00
Armin Novak
0876fb555d
[proxy,modules] dyn-channel-dump check config for NULL
2023-06-29 11:05:37 +02:00
Armin Novak
80058caa4d
[proxy,modules] check return of pf_modules_run_hook
2023-06-29 11:05:37 +02:00
Armin Novak
a85aee580f
[proxy,modules] add channel dump plugin
2023-06-27 17:36:57 +02:00
Armin Novak
fd338c3bd4
[server,proxy] allow reading arbitrary keys from config
...
Allow the proxy configuration to contain arbitrary section/key/value
entries which can be used by plugins for configuration.
2023-06-27 17:36:57 +02:00
akallabeth
1fc0d5b4b1
[winpr] remove casts for winpr_RAND calls
2023-06-21 09:57:52 +02:00
Armin Novak
98b7c88df7
[proxy,modules] fix bitmap filter drdynvc write
2023-06-08 08:13:16 +02:00
Armin Novak
970f0c54e8
[stream] use const correct Stream_Pointer access
2023-06-08 08:09:33 +02:00
Armin Novak
a4c6b36a19
[build] fix memory sanitizer stack frame warnings
2023-06-07 09:14:45 +02:00
akallabeth
2b3c8c47a4
[build] fix install with BUILD_SHARED_LIBS=OFF
...
generate proper CMake targets so static linking works again.
2023-05-12 08:03:56 +02:00
David Fort
7b84f2f740
proxy: fix treatment of client channels
...
Iteration on channels was done with the wrong counter leading to incorrect behaviour.
2023-05-09 07:52:06 +02:00
Armin Novak
7212621eae
[proxy,config] PEM length must contain '\0'
2023-05-08 22:54:53 +02:00
Armin Novak
fad46c4455
[server,proxy] add additional PEM headers
...
there are some more PEM formats in use, add the headers
2023-04-26 09:55:26 +02:00
Armin Novak
e0aec72d71
[pkg-config] unify exec_prefix
2023-04-24 22:01:15 +02:00
Armin Novak
f674b209ff
[pkg-config] unify libdir
2023-04-24 22:01:15 +02:00
Armin Novak
c1cd48cb3c
[server,proxy] allow PEM in config file
...
CertificateContent and PrivateKeyContent now have two valid formats:
It can be in format PEM (multiple lines) or a single line base64 encoded
PEM.
The first format is preferrable in case the pf_config* API is used to
set the certificate/key, the latter in case an actual config file is in
use where multiline configuration data can not be directly entered.
2023-04-24 10:57:22 +02:00
akallabeth
4d663682bc
[server,proxy] ensure PEM length is strlen(pem) + 1
...
The decoded base64 data might contain PEM with/without/with multiple
'\0' at the end of the string. We do not want to drag this through our
code so ensure the length matches the string length including '\0'
2023-04-17 17:59:06 +02:00
akallabeth
48bbb08793
[server,proxy] remove too strict assert
2023-04-14 15:54:26 +02:00
akallabeth
c3f6b665cc
[server,proxy] improve error message for invalid base64
...
If the certificate or private key are supplied as base64 encoded string
inform what happened before aborting.
2023-04-14 15:54:26 +02:00
Armin Novak
ba7840f8ad
[server,proxy] fix rdpdr rewrite
...
do not touch the stream if no rewrite is done.
2023-04-14 08:02:49 +02:00
Armin Novak
85cff3a7dc
[server,proxy] fix private/public library linking
2023-03-10 11:40:08 +01:00
Armin Novak
c23dc3ba9d
[CMake] Fix use of BUILD_SHARED_LIBS
...
the option is named BUILD_SHARED_LIBS and not CMAKE_BUILD_SHARED_LIBS
2023-03-10 11:40:08 +01:00
akallabeth
273bb6a7a8
[build] use static libraries as intermediate
2023-03-01 08:18:34 +01:00
akallabeth
b4e9c8b39f
[build] removed complex libraries
...
* remove obsolete complex libraries helper
* fix static linking
2023-03-01 08:18:34 +01:00
David Fort
b8814e723a
fix some warning with the use of new crypto functions
2023-02-28 07:59:40 +01:00
Armin Novak
f0e9797b4c
[build] require CMake >= 3.13
...
required for target_link_options
2023-02-27 11:18:02 +01:00
akallabeth
87e90903ab
[server,proxy] use rdpPrivateKey and rdpCertificate
2023-02-16 10:06:17 +01:00
Armin Novak
a7dac52a42
[license] updated copyright headers
2023-02-12 20:17:11 +01:00
akallabeth
b869927407
[proxy,config] extract PEM from config file
...
* Read a PEM file if provided via config
* Base64 decode if the certificate/private key are provided in the
config file
2023-02-12 20:17:11 +01:00
akallabeth
ab2de5d60c
[proxy,filter] fixed uninitialized value in bitmap-filter
2023-02-12 20:17:11 +01:00
Martin Fleisz
4b9fb8fff9
proxy: Fix NLA to TLS fallback connection
...
Currently the proxy's TLS fallback if an NLA connection attempt failed
is broken. There are two issues with the current code that this PR
fixes:
- freerdp_reconnect is used which requires an already established
connection to work correctly. This is not the case since the NLA
connectin attempt failed. This resulted in a seemingly working TLS
connection but i.e. channels where missing/not working.
- The fallback connection attempt just altered the NLA security setting
in the instance's settings. However these settings have been already
modified by the NLA connection attempt so we need to create a copy of
the original connection settings before doing the first connect.
The PR also introduces freerdp_reset_context which restores the initial
connection settings for the given instance.
2023-02-09 12:49:47 +01:00
akallabeth
17895714c2
[proxy,modules] fix missing link dependency
...
bitmap-filter requires freerdp functions to be linked
2023-01-27 16:01:33 +01:00
Armin Novak
4043658d04
[proxy,modules] add persist-bitmap-filter plugin
...
This plugin allows the proxy to filter persistent bitmap
capabilities and [MS-RDPEGFX] cache import offer
2023-01-26 09:30:17 +01:00
akallabeth
ee07a13130
[cleanup] fix compiler warnings
2023-01-26 09:30:17 +01:00
akallabeth
353d796476
[proxy,modules] update demo plugin
2023-01-26 09:30:17 +01:00
akallabeth
f26079edf2
[proxy] implement dynamic channel filter
...
* Allow modules to configure intercept channels
* Allow modules to rewrite packets
2023-01-26 09:30:17 +01:00
akallabeth
2067a480e9
[proxy] clean up channeltracker
...
Use getter/setter and unify stream allocation/reset
2023-01-26 09:30:17 +01:00
Armin Novak
641022b795
[logging] remove __FUNCTION__ from actual message
...
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth
075506f6c8
[winpr,stream] use new Stream_CheckAndLogRequiredLength*
2023-01-25 14:27:32 +01:00
akallabeth
74530a7931
[format strings] ensure __LINE__ is of type size_t
...
__LINE__ is not particularily well defined (most fall back to int).
We want to ensure that all the uses in a format string match the format
specifier, so do an explicit cast
2023-01-25 14:27:32 +01:00
akallabeth
275741cc75
[core,utils] add drdynvc stringification functions
2023-01-12 22:54:25 +01:00
akallabeth
0234204130
[proxy,channel] make tracker opaque
2023-01-12 22:54:25 +01:00
akallabeth
08a2d61d6d
[proxy] fix possible NULL crash on shutdown
2023-01-12 22:54:25 +01:00
Armin Novak
c7868e7a3f
[proxy,rdpdr] added translation layer for rdpdr versions
...
rdpdr filesystem has 2 different versions and mstsc uses the older one
under certain conditions.
2023-01-10 11:49:38 +01:00
Armin Novak
f1e7cc0d48
[rdpdr] unify header read/write
2023-01-10 11:49:38 +01:00
Armin Novak
5a0b8fb688
[proxy,rdpdr] keep capability versions consistent
2023-01-10 11:49:38 +01:00