Commit Graph

4288 Commits

Author SHA1 Message Date
akallabeth
e865c24efc Added missing length checks in zgfx_decompress_segment
(cherry picked from commit 64716b335858109d14f27b51acc4c4d71a92a816)
2022-11-14 09:28:36 +01:00
akallabeth
d859574f8c Expose CONNECTION_STATE via public API
* Expose type CONNECTION_STATE
* Add getter freerdp_get_state
* Add helper freerdp_state_string

(cherry picked from commit 32b3f54bb3)
2022-11-07 10:20:42 +01:00
Siva Gudivada
7a2215fd40
Backport TLS1.2 enforcement and version control from master to stable2.0 (#8094)
* Add a new command line arg to enforce tls1.2

* Add better explanation of FreeRDP_EnforceTLSv1_2

(cherry picked from commit ce2e3ab0c7)

* Regenerated settings helpers

* backport prev cherry-pick

* Cleanup tls_prepare

* TLS version control

* added settings for minimal and maximal TLS versions supported
* refactorisation of the force TLSv1.2 setting

* cleanup from prev cherry-pick

* updated change log

Co-authored-by: akallabeth <akallabeth@posteo.net>
Co-authored-by: David Véron <david.veron@rubycat.eu>
2022-07-28 14:12:12 +02:00
akallabeth
26a83e6ccd
Moved clipboard utils to core library, fixes #6760 (#7752)
* Moved clipboard utils to core library, fixes #6760

(cherry picked from commit 4fb686d40f)

* Fixed compilation warnings in cliprdr_utils

(cherry picked from commit 8b7a086411)

* Fixed backport API mismatch

* Added C++ guards to header

(cherry picked from commit 7626a2ce6a)
2022-07-28 13:45:57 +02:00
Pascal Nowack
f344d1d481
[stable-2.0] codec/progressive: Fix wrong usage of subband diffing flag (#8077)
* codec/progressive: Fix wrong usage of subband diffing flag (#8076)

Currently, all Calista Progressive encoded streams contain tile
artifacts, when the RFX_SUBBAND_DIFFING is used, but not the
RFX_DWT_REDUCE_EXTRAPOLATE flag.
The reason is the wrong usage of the context and tile flags.
The RFX_SUBBAND_DIFFING flag should have no actual impact on the
decoder itself.
Especially, it does not affect the band sizes within a 64x64 tile.
The RFX_DWT_REDUCE_EXTRAPOLATE flag, on the other hand, MUST have an
effect on the band sizes.
However, FreeRDP currently uses the RFX_SUBBAND_DIFFING flag when
decoding a component to determine whether the Reduce-Extrapolate method
is used, resulting in tile artifacts, when that method was actually not
used.
The current behaviour did not result in tile artifacts with the MS
Windows RDS, as that server always sets both flags.

So, fix this issue by using the correct flag, when decoding a tile.

* Update changelog
2022-07-15 08:52:02 +02:00
Pascal Nowack
28d968a4d6 client/X11: Relieve CLIPRDR filename restriction when possible
Microsoft Windows imposes strict filename restrictions on its platform.
As RDP is developed by Microsoft and the RDS in MS Windows is typically
used as remote desktop server for the RDP protocol, these filename
restrictions are also enforced in WinPR, when copy-pasting files over
the clipboard.
However, in some connections no peer on MS Windows is involved and in
these situations, these filename restrictions are just an annoyance.

With a recent API addition in WinPR, it is now possible to override the
callback, where the filename is checked, whether it is valid.
So, use this new API to relieve the filename restriction, when the
connected remote desktop server is not on MS Windows.
2022-07-07 13:47:25 +00:00
Pascal Nowack
9a21f79ae1 freerdp/peer: Add APIs to get OS major and minor type strings 2022-07-07 13:47:25 +00:00
akallabeth
dd3bdc0dcd Fixed broken format string in rdg.c
(cherry picked from commit f55a420a00)
2022-07-01 11:29:16 +02:00
akallabeth
a4c86723a3 Unifiy string append functions
(cherry picked from commit f25261e271)
2022-06-29 14:42:22 +02:00
akallabeth
b3a4b71717 Added RAIL compartmentinfo server to client message
(cherry picked from commit ad6dd99190)
2022-06-29 14:42:22 +02:00
Adrian Perez de Castro
436f212be3 Fix building with LibreSSL 2.7.0 or newer
With LibreSSL 2.7.0 (or newer versions) some more structs have made
opaque, which requires a few changes:

- BIO_meth_new() and related functions are now defined by LibreSSL, the
  versions from opensslcompat.{h,c} does not need to be used anymore.
- HMAC_CTX is now opaque, HMAC_CTX_new(), EVP_MD_CTX_new, and related
  functions should be used instead in winpr's hash.c.
2022-06-27 13:42:29 +02:00
Richard Dymond
a7664ea88a Add WTSChannelGetOptions 2022-06-08 16:52:58 +02:00
Pascal Nowack
6826d3626a core/server: Add APIs to get notified of DVC creation statuses
This allows server implementations to add handling for situations,
where the client side does not support them.
Particularly useful for the audio output channels (static channel as
fallback, when dynamic channel is not supported).
2022-06-08 16:19:31 +02:00
kubistika
601d01f7b4 core: server: add API to get peer accepted channel names
(cherry picked from commit 508ba9201f)
2022-06-03 08:06:53 +02:00
akallabeth
c5672a992a Unified neon source options
(cherry picked from commit bfdbe18029)
2022-05-04 09:41:01 +02:00
akallabeth
f1bf99f075 Only build RFX neon path with -DWITH_NEON=ON
(cherry picked from commit d18187c949)
2022-05-04 09:41:01 +02:00
Armin Novak
50bc2d59e8 Fixed #7158: detection of arm neon.
(cherry picked from commit 6e075a6a7d)
2022-04-28 08:02:01 +02:00
Armin Novak
fb50329a9d Fixed #7837: Overallocate zgfx output buffers
Some decoders require additional byte alignment to prevent out
of bound reads

(cherry picked from commit ce60606e19)
2022-04-27 18:45:36 +02:00
akarl
97957fcde0 Implement BIO_CTRL_GET_KTLS_SEND and BIO_CTRL_GET_KTLS_SEND
Openssl 3.0 requires to respond to this controls. According to there
documentation it should not need them, but in practice openssl's own source
is full of places where negative return values are not checked.

(cherry picked from commit 9d7c20ce8f)
2022-04-25 09:19:45 +02:00
akallabeth
9ab0667b54 Fix #7785: Missed GatewayHttpUseWebsockets initialization
In backport #6877 this was missed.
2022-04-07 12:25:24 +02:00
Armin Novak
a923f59c20 Fixed #7745: Progressive surface cleanup
(cherry picked from commit edcb8284e7)
2022-04-06 11:02:18 +02:00
Armin Novak
061edc109f Fixed backport compile problems 2022-04-06 10:22:06 +02:00
Armin Novak
c6bd48f926 Use GetComputerName instead of gethostname
(cherry picked from commit 82165d95a9)
2022-04-06 10:22:06 +02:00
Armin Novak
2008751c04 Replaced WINPR_ASSERT defines, use include 2022-03-28 12:08:51 +02:00
Armin Novak
6462eca724 Workaround for [MS-RDPBCGR] 2.2.9.2.3 Frame Marker Command (TS_FRAME_MARKER)
Connections with  windows 2016 and 2019 sometimes receive short
frame marker. Ignore these to prevent disconnects

(cherry picked from commit 91ef44ed35)
2022-03-09 16:19:34 +01:00
Armin Novak
79207e6700 rfx_process_message verbose error log
(cherry picked from commit c194a68b1b)
2022-03-08 15:35:54 +01:00
Armin Novak
631e71bebd Added more log messages for SurfaceCommand failures
(cherry picked from commit c6f2040912)
2022-03-08 15:35:54 +01:00
Armin Novak
1e9485e4d9 Fixed #7696: Abort freerdp_connect if manually canceled
If freerdp_abort_connect is called, set FREERDP_ERROR_CONNECT_CANCELLED
This way freerdp_reconnect can distinguish between network issues and
user interaction and abort a retry attempt.

(cherry picked from commit a6b42ff6c9)
2022-03-07 15:24:08 +01:00
akallabeth
de805f8565 Decreased logging verbosity for INFO level
(cherry picked from commit e6b0373859)
2022-03-03 10:52:00 +01:00
akallabeth
b076803219 Added openH264 decoder frame flush
(cherry picked from commit 366ad75bb4)
2022-02-28 08:51:58 +01:00
Hiroshi Ota
e480e97ea0 Fix missing KBD_JAPANESE condition
(cherry picked from commit 18e8a67f75)
2022-02-14 09:21:41 +00:00
akallabeth
9299d2fce1
Fix #7586: Update size of tile cache if required. (#7603)
(cherry picked from commit e0660ba694)
2022-01-28 09:07:35 +01:00
Armin Novak
3dfe3e8b57 Fixed too eager assert.
(cherry picked from commit 2ed5a6912b)
2022-01-26 12:38:11 +01:00
Armin Novak
4b73d86880 Removed x264 related files from build 2022-01-26 12:10:47 +01:00
Armin Novak
f41a4656d8 Added missing include
(cherry picked from commit 4867dea562)
2022-01-26 10:48:26 +01:00
Armin Novak
4744643dc1 Fixed statement expressions and missing goto
(cherry picked from commit adcec5d928)
2022-01-26 10:48:26 +01:00
Armin Novak
4101fe3be7 Added code assertions, fixed loading order
(cherry picked from commit 92d56b77f5)
2022-01-26 10:48:26 +01:00
Ely Ronnen
7cc9a10e8e handling small input buffer case
(cherry picked from commit 5c2916aa59)
2022-01-26 10:48:26 +01:00
Ely Ronnen
27a955a780 import libmediandk.so dynamically
(cherry picked from commit 5fbaeea425)
2022-01-26 10:48:26 +01:00
Ely Ronnen
8adbb187be adding mediacodec h264 implementation using NDK
(cherry picked from commit afe6cc10bd)
2022-01-26 10:48:26 +01:00
David Runge
95b0759feb Guard avcodec_register_all() calls
{channels/tsmf/client/ffmpeg/tsmf,libfreerdp/codec/dsp}_ffmpeg.c:
Guard calls to `avcodec_register_all()` against use beyond
`AV_VERSION_INT(58, 10, 100)`, where upstream ffmpeg made it obsolete.

(cherry picked from commit 811d94c742)
2022-01-25 09:15:19 +01:00
Armin Novak
a87c2a28fe Fixed missing ffmpeg deprecation guard
(cherry picked from commit 3303a2feaf)
2022-01-24 11:56:47 +01:00
Armin Novak
bbeb3e08eb Added adjustable tcp connect timeout
(cherry picked from commit 2a91afb0cf)
2022-01-10 12:05:36 +01:00
akallabeth
bdcc13f96f Fixed size checks for locale detection.
Reported by George Zaytsev from Positive Technologies

(cherry picked from commit 8d5127cf06d57774a45f421afd551a39b849aedb)
2022-01-10 11:12:39 +01:00
Martin Fleisz
e4e3456e68 locale: Fix keyboard detection on MacOS
(cherry picked from commit 68dfa353b8)
2022-01-10 11:04:58 +01:00
Steve Pronovost
6b8558f3fa Fix protocol violation when uploading large ICON
When uploading large ICON (96x96), we end up growing the stream
mid-update. Stream_EnsureCapacity end up reallocating the stream
with a larger capacity to accomodate the large ICON size, but in
doing so, also updating the sealed length for the data currently in
the stream. This breaks the assumption between update_begin_paint
and update_end_paint where the sealed lenght is used to keep track
of the location where we need to update the orders counts after
we're done accumulating update. As a result of the growth and lost
of that location, the number of orders is written to the wrong
location and the resulting stream is invalid which result in a
protocol violation and a connection drop.

The current fix uses a new offsetOrder in the update object to
keep track of where update_end_paint needs to write the number
of orders contained. I think a better fix would be for
Stream_EnsureCapacity to preserve the sealead length of the
stream on growth, but this has a much more significant impact and
careful analysis needs to be done to ensure this doesn't violate
other assumption. Need to follow up with FreeRDP developer to get
their take on this one.
2021-12-17 11:47:45 +01:00
akallabeth
c54c846b59 Added stack trace on signal.
(cherry picked from commit cf49e4bfa8)
2021-11-29 07:50:02 +01:00
Theo Buehler
bfbef39759 Fix build for upcoming LibreSSL version
SSL will become opaque in LibreSSL 3.4.x, hence the code reaching inside
it will result in build breakage. This was done at the time for lack of
BIO_up_ref() support, which has been available since LibreSSL 2.7.0, so
adjust the relevant #ifdefs accordingly.

(cherry picked from commit ad0b6c377d)
2021-11-17 10:09:16 +01:00
akallabeth
4034026072 Fixed #7436: Datatype mismatch 2021-11-12 17:03:23 +01:00
akallabeth
2ddb22f7a4 Fixed #7436: Datatype mismatch to crypto_base64_decode 2021-11-12 12:12:04 +01:00