Commit Graph

437 Commits

Author SHA1 Message Date
akallabeth
163aec7e2b
[warnings] fix documentation command unknown 2024-09-12 21:21:41 +02:00
akallabeth
afff514ca7
[compiler] add WINPR_ATTR_MALLOC
Add WINPR_ATTR_MALLOC checks to allocating functions to help compilers
find memory leaks or allocation mismatches
2024-09-12 20:09:22 +02:00
akallabeth
fb5934007a
[doxygen] add basic documentation for new API
* Add basic documentation for new functions/structs/data types since
  3.0.0
2024-09-12 20:09:19 +02:00
akallabeth
7aa72a7507
[core,settings] unify configuration paths
* Add new function freerdp_settings_get_config_path to get current
  user configuration directory
* Add CMake option WITH_FULL_CONFIG_PATH (default OFF): If defined, use
  <appdata>/Vendor/Product as config directory, otherwise use
  <appdata>/vendor (lowercase, only if vendor equal to product)
2024-06-06 11:31:22 +02: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
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
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
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
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
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
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
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
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
Mariusz Bialonczyk
c4c8571710 [cmdline] add prevent-session-lock cmdline argument and settings variable 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
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
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
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
akallabeth
635626be12 [client,common] avd related keys to rdp file parser 2023-09-21 10:30:09 +02:00
akallabeth
b4ce44c290 [settings] add freerdp_settings_take_string
this function can take an allocated value, set the settings string to it
and free it up once replaced by something else.
2023-09-02 07:56:21 +02:00
Marc-André Moreau
30c31d64e8 WinSCard dynamic API loading with /winscard-module cli argument 2023-08-23 12:26:27 +02:00
Armin Novak
aa2c48840a [client,sdl] fix high dpi detection
* convert dpi value to percentage used by RDP
* fix detection of current monitor resolution for SDL windows
2023-07-31 13:41:26 +02:00
Dan Holliday
8c584c29dd Started to add support for multi-monitor. 2023-07-31 13:41:26 +02:00
Armin Novak
3d1bb4e1d9 [client,common] allow forcing default callbacks
All clients can implement their own callbacks for
certificate/credential/smartcard/... but there is a common (default)
implementation for all clients.
with the new setting FreeRDP_UseCommonStdioCallbacks it is now possible
to force these over the client implementation provided ones
2023-07-20 14:25:08 +02:00
Armin Novak
10e010329c [client,file] add WebAuthN rdp file parsing support 2023-07-10 10:45:28 +02:00
akallabeth
a01f3ec5ab [client,common] allow adding a named keyboard pipe
This allows starting FreeRDP clients with a named pipe that will type in
text written to the named pipe as keyboard input
2023-07-03 13:21:43 +02:00
Michael Saxl
d55e035260 [gateway,arm] Azure Virtual Desktop Gateway support
This PR creates a new /gateway:type:arm transport.
It depends on CJSON

The arm transport is not a transport by itself but is responsible
for getting the websocket endpoint from a configuration url derived from
the configured gateway host in the rdpw file or cmdline
2023-06-27 21:15:08 +02:00
Michael Saxl
44c1ec3276 [gateway,websocket] implement plain websocket transport
* factor out most websocket specific code parts into websocket.c
* create wst.c (Websocket Transport) as gateway transport implementation
* introduce GatewayUrl setting that holds the websocket url
* introduce GatewayHttpExtAuthBearer that holds the HTTP Bearer
* GatewayHttpExtAuthBearer can be used by both rdg and wst
2023-06-22 09:21:42 +02:00
Michael Saxl
6478edda5b rdg bearer support 2023-06-22 09:21:42 +02:00
akallabeth
393577750e [settings] add FreeRDP_ClipboardFeatureMask 2023-05-25 16:26:39 +02:00
Pascal Nowack
288f4d58f0 core: Make a couple of capability defines public
The settings for these defines are public, but these settings cannot be
properly used, when the respective defines are not public too.
2023-05-02 09:51:40 +02:00
Richard Markiewicz
13e52cfae2 [channels,settings] add a setting to ignore invalid devices 2023-04-24 11:29:05 +02:00
Armin Novak
391f5e0ddb [settings] add freerdp_supported_color_depths_string 2023-04-13 14:35:51 +02:00
Armin Novak
39767c5423 [settings] add supported color depths setting 2023-04-13 14:35:51 +02:00
akallabeth
a5b42f0f84 [includes] untangled circular includes 2023-03-15 08:22:23 +01:00
akallabeth
61779694ee [includes] improved c++ guards 2023-03-15 08:22:23 +01:00
fifthdegree
4cbfa006f2 Implement support for RDS AAD
Have a working implementation of the RDS AAD enhanced security mechanism
for Azure AD logons
2023-03-10 16:38:07 +01:00
Joan Torres
7c24da917e Add RDSTLS security protocol
The client tries to connect using RDSTLS only when it has received a
server redirection PDU with LB_PASSWORD_IS_ENCRYPTED flag.

The server exposes RDSTLS on negotiation if it has been configured on settings.
Then authenticates a client using configured credentials from settings:
RedirectionGuid, Username, Domain, Password.
2023-03-08 14:05:00 +01:00
Armin Novak
ae8f0106bd [core,redirect] extract and check redirection cert
* extract the certificate from the redirection PDU
* if there is a certificate provided accept it if it matches the
  redirection target certificate without further user checks
2023-02-28 15:49:58 +01:00
akallabeth
2d94ff3f9e [settings] remove obsolete keys
* CertificateFile and CertificateContent are no longer used
* PrivateKeyFile and PrivateKeyContent are no longer used
2023-02-16 10:06:17 +01:00
Armin Novak
a7dac52a42 [license] updated copyright headers 2023-02-12 20:17:11 +01:00
akallabeth
af371bef6a [crypto] rename rdpRsaKey to rdpPrivateKey 2023-02-12 20:17:11 +01:00
akallabeth
9b51df8b10 [core,crypto] refactor certificate management
* Properly split certificate_store, certificate_data, certificate and
  private key functions to files
* Prefix all functions with freerdp_ to have a unique name
* Update certificate store to use one file per host instead of
  known_hosts2
* Merge CryptoCert and rdpCertificate
2023-02-12 20:17:11 +01:00
akallabeth
2eda0aa2ea [core,settings] remove unused setting 2023-02-03 11:24:32 +01:00
akallabeth
2c2e9602b3 [core] refactor certificate handling
* Remove duplications in rdpRsaKey, reuse rdpCertificate for public
  components
* Move all private key and certificate code to certificate.c,
  remove the tssk_* variables from gcc
* Handle update of client and server random keys in wrapping functions
* Simplify gcc_write_server_security_data, use certificate.c functions
  to write the certificate data
* Refactor security_establish_keys, use the random values stored in
  settings directly
2023-02-03 11:09:59 +01:00