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
Joan Torres
5f8e64f89c
[core,connection]: Fix load balance setting on redirection
...
The routing token is already set for the nego on rdp_client_connect func.
2023-03-08 08:36:42 +01:00
Armin Novak
37936f5cbb
[core,connect] check for valid hostname
2023-03-06 10:04:59 +01:00
Armin Novak
f5462bdf92
[core] fix rdp_client_establish_keys
2023-03-06 08:35:24 +01:00
Armin Novak
2450bf75e8
[core] improve assertions and logging
2023-03-05 17:03:18 +01:00
akallabeth
adce7378c3
[core,cache] make protocol caches private
...
most protocol internal caches do not need to be exposed. this reduces
the public API and allows us to more easily improve/change this during a
release cycle
2023-02-27 17:31:52 +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
94b2f551b3
[core] update to new crypto/cert API
2023-02-12 20:17:11 +01:00
akallabeth
51e71b3c48
Fixed compiler warnings
2023-02-03 11:09:59 +01:00
akallabeth
a082f2b78a
[core] improve logging
2023-02-03 11:09:59 +01:00
akallabeth
31695c94a1
[client random] refactor use
...
* use sizeof() instead of define length
* use settings getter/setter
2023-02-03 11:09:59 +01:00
akallabeth
a3152871ab
[core,crypto] refactor rsa functions
...
* public encrypt/decrypt take rdpCertInfo data as argument
* private encrypt/decrypt take rdpRsaKey as argument
* Add missing length arguments
2023-02-03 11:09:59 +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
Armin Novak
70f6c09ff4
[core] fix persistent bitmap cache setting
...
* Only activate if both, client and server support the capability
* Use settings getter to access setting
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
Armin Novak
a111a19c58
[core] check return of rdp_write_security_header
2023-01-25 09:37:40 +01:00
Armin Novak
2fc24420d1
[core] fix server side skip channel join
...
move to state CONNECTION_STATE_RDP_SECURITY_COMMENCEMENT instead of
CONNECTION_STATE_SECURE_SETTINGS_EXCHANGE
2023-01-25 09:37:40 +01:00
akallabeth
f2b934866a
[core,connection] code cleanups
2023-01-24 10:16:55 +01:00
akallabeth
23281121bf
[core] implement skip channel join
2023-01-20 11:19:18 +01:00
David Fort
bee2873b52
core: in connection.c use constant instead of raw value
2022-12-23 08:42:45 +01:00
Armin Novak
0e25f99602
Revert "[server,shadow] rdp_server_reactivate do not wait"
...
This reverts commit 34f44ce4a1
.
2022-12-22 15:09:03 +01:00
Armin Novak
34f44ce4a1
[server,shadow] rdp_server_reactivate do not wait
...
in rdp_server_reactivate do not wait for the server to change state, let
the peer state machine handle that.
2022-12-19 10:38:18 +01:00
Armin Novak
b41ef0cda7
[core,client] fixed connection timeout abort
...
the abort condidion was not properly triggered.
2022-12-12 18:08:42 +01:00
akallabeth
37ab25e19d
Fixed all Wdocumentation warnings
2022-12-12 14:24:55 +01:00
Armin Novak
917e392f1e
[client] fix connection active checks
...
* use freerdp_is_active_state for session active checks
* fix state transitions
2022-12-12 12:59:32 +01:00
Armin Novak
a14c75a3a2
[core,client] handle optional monitor layout PDU
...
The monitor layout PDU is optional. If that was not received assume it
will not be sent and continue in next state.
2022-12-12 12:59:32 +01:00
akallabeth
d3e9210985
[core] added freerdp_is_active_state
...
Since client and server use different states to indicate the connection
is activated, add this convenience function to determine that
2022-12-12 12:59:32 +01:00
Armin Novak
c22d3736a3
[client] refactor client activation timeout
...
Move the code to a function to make it more readable
2022-12-12 12:59:32 +01:00
akallabeth
2809e14064
[core,connection] fix missing logger argument
2022-12-09 20:30:23 +01:00
Armin Novak
358ac53b66
[core,license] print a warning on invalid packet
...
* add stringify function for securityFlags
* print a error message on unexpected packet
2022-12-03 00:13:27 +01:00
akallabeth
1304af4748
[core,rdp] Refactor rdp security encryption
...
Unify rc4 encryption key handling, use common free and reset functions
2022-11-25 12:35:14 +01:00
akallabeth
68bd3b63ae
[server] Fix rdp_peer_handle_state_demand_active
...
* Return type is state_run_t
* Fix use, check for success
2022-11-22 15:30:31 +01:00
Armin Novak
a40ade5abc
Fixed -Wincompatible-pointer-types
2022-11-21 10:12:31 +01:00
Armin Novak
b56b09840a
Fixed -Wshadow
2022-11-21 10:12:31 +01:00
akallabeth
d83f70bc32
[core,transport] event handle for transportIO
...
With the latest client changes the internal event loop requires a handle
to wait on. Add a new function to (re)set the newly added transport event handle.
2022-11-16 15:32:32 +01:00
akallabeth
4ccb38aa13
[core] Check return value of *_transition_to_state
...
The state transition might not be allowed, so abort if that fails.
2022-11-16 15:32:32 +01:00
akallabeth
bc31bae2b5
[core] Unify RDP state machine
...
Up to this commit the client and server state machine handling used
different return values for state machine changes.
This is fixed with this commit:
* Use common enum return values
* Use common helper functions
2022-11-15 09:57:46 +01:00
Armin Novak
367ecf3c0b
Properly handle demand active state
...
The demand active state might be called when receiving data from the
client during initial connection phase or might be triggered server
side after sending a deactivate all pdu
2022-11-11 11:51:27 +01:00
Armin Novak
8210ee77db
Fixed return of rdp_client_transition_to_state
...
Use BOOL to just indicate success/failure and actually check return
of functions called.
2022-11-11 11:51:27 +01:00
akallabeth
33827cb920
Updated RDP state machine
...
* More detailed states
* Better transition checks
* No more recursive calling of state machine functions
2022-11-11 11:51:27 +01:00
akallabeth
06c2ab76e0
Remove AwaitCapabilities
2022-11-11 11:51:27 +01:00
akallabeth
2ef506cff2
Better checks on activation received
...
Check for reactivation, remember resolution, ...
2022-11-04 14:46:58 +01:00
akallabeth
b9e701aa3d
Added return value for rdp_write_header
2022-11-04 14:46:58 +01:00
David Fort
ef1a3b0af6
client: improve connection time
...
The old code was looping with blindly checking for transport events, and then
sleep for 100 ms. It was doing that until the connection is established or
the timeout expired.
The new version polls the transport's events, potentially not having many 100 ms
waits.
2022-11-04 09:50:31 +01:00
akallabeth
7d67adbc54
Refactored licensing module
...
* Make the whole module opaque for easier testing
2022-11-03 17:02:47 +01:00
Marc-André Moreau
e3594c91dc
Add UserSpecifiedServerName setting, /server-name command-line parameter
2022-10-14 17:59:57 -04:00
Armin Novak
a3ec857278
Improved MCS checks, added settings to MCS function
2022-10-13 13:57:11 +02:00
Armin Novak
d0ae1c8160
Moved pubSub to rdpRdp
2022-07-06 12:01:23 +02:00
Armin Novak
29af8a45b6
Fixed missing LoadChannels calls and settings on redirect
2022-06-27 14:27:12 +02:00