Commit Graph

6902 Commits

Author SHA1 Message Date
Pavel Tsekov
c51c5df2ff * include/freerdp/codec/color.h:
(freerdp_color_convert_drawing_order_color_to_gdi_color): Declare new
function.
* libfreerdp/codec/color.c:
(freerdp_color_convert_drawing_order_color_to_gdi_color): Implement.
(freerdp_image_convert_8bpp): Properly use the ARGB32/ABGR32/RGB32/BGR32
macros when converting 8bpp data to 32bpp.
(freerdp_image_convert_32bpp): Fix CLRCONV_ALPHA and CLRCONV_INVERT
processing for 32bpp destination.
(freerdp_mono_image_convert): Use ARGB32/ABGR32 when converting to 32bpp
and CLRCONV_ALPHA is set.
* libfreerdp/core/orders.c: Color data from drawing orders is
interpreted in big endian mode.
* libfreerdp/core/update.c (update_read_palette): Likewise.
* libfreerdp/gdi/16bpp.c (gdi_get_color_16bpp): GDI colors are stored as
RGB now.
* libfreerdp/gdi/32bpp.c (gdi_get_color_32bpp): Likewise.
* libfreerdp/gdi/gdi.c:
Use freerdp_color_convert_drawing_order_color_to_gdi_color() to convert
from drawing order color representation to GDI color representation
troughout.
* libfreerdp/gdi/graphics.c (gdi_Glyph_BeginDraw): Likewise.
(gdi_Glyph_EndDraw): Likewise.
2014-08-07 00:58:58 +03:00
U-PAVEL\Pavel Tsekov
8a4f134fab Revert to 15d2b35574 2014-08-05 14:35:31 +03:00
Pavel Tsekov
e13f93aa1b Allow the user to enable/disable performance features regardless of
their default values.
2014-08-04 18:14:08 +03:00
Pavel Tsekov
8c3080f345 Fix 1bpp to 32bpp conversion with CLRCONV_ALPHA on
* libfreerdp/codec/color.c (freerdp_mono_image_convert): Use
ARGB32/ABGR32 when
using 32bpp framebuffer and CLRCONV_ALPHA is set.
2014-07-29 11:19:25 +03:00
Marc-André Moreau
15d2b35574 Merge pull request #1982 from bmiklautz/feat/read_pdu
Transport re-factor and clean up
2014-07-28 16:32:06 -04:00
Marc-André Moreau
e65f8b119d Merge pull request #2005 from nfedera/fix-2014-07-28-01
OpenSSL thread safety
2014-07-28 16:08:10 -04:00
Norbert Federa
cdcdec99bc OpenSSL thread safety
freerdp/winpr had the following issues:
* The non reentrant SSL_library_init() was called concurrently (crash)
* Missing code/api to set the eventually required OpenSSL static and dynamic locking callbacks
* Missing code/api to free the application-global or thread-local OpenSSL data and tables

This commit creates two new winpr functions:

BOOL winpr_InitializeSSL(DWORD flags):

Use the flag WINPR_SSL_INIT_ALREADY_INITIALIZED if you want to tell winpr that
your application has already initialized OpenSSL.
If required use the flag WINPR_SSL_INIT_ENABLE_LOCKING to tell winpr that it
should set the OpenSSL static and dynamic locking callbacks.
Otherwise just call it with the flag WINPR_SSL_INIT_DEFAULT.

The recommended way is that your application calls this function once before
any threads are created. However, in order to support lazy OpenSSL library
initialization winpr_InitializeSSL() can also safely be called multiple times
and concurrently because it uses the new InitOnceExecuteOnce() function to
guarantee that the initialization is only performed successfully once during
the life time of the calling process.

BOOL winpr_CleanupSSL(DWORD flags):

If you create a thread that uses SSL you should call this function before the
thread returns using the flag WINPR_SSL_CLEANUP_THREAD in order to clean up
the thread-local OpenSSL data and tables.
Call the function with the flag WINPR_SSL_CLEANUP_GLOBAL before terminating
your application.

Note: This commit only replaced the current occurences of the
SSL_load_error_strings(); SSL_library_init(); pairs in the freerdp source
with winpr_InitializeSSL(). None of the server or client applications has been
changed according to the recommended usage described above (TBDL).
2014-07-28 21:55:57 +02:00
Marc-André Moreau
4dd4d41a3f Merge pull request #2000 from jbd1986/master
remove multimon/span logic from cmdline.c and move to new combined logic...
2014-07-28 15:55:18 -04:00
Justin DeFields
65aab2569d Move multimon/span logic from cmdline.c to client.c post processing 2014-07-28 15:24:48 -04:00
Marc-André Moreau
1c1ef01691 Merge pull request #2004 from bmiklautz/fix/cmd_post
Fix/cmd post
2014-07-28 14:49:26 -04:00
Bernhard Miklautz
ff26a90489 return status instead of returning directly 2014-07-28 18:49:18 +02:00
Bernhard Miklautz
32bb18152a cmdline post: cleanup in case of oom 2014-07-28 17:57:51 +02:00
Bernhard Miklautz
f06490b426 fix freerdp_client_settings_post_processing 2014-07-28 17:52:40 +02:00
Bernhard Miklautz
b17045ddd8 fix: typos and formating 2014-07-28 13:12:01 +02:00
Marc-André Moreau
6812383d05 Merge pull request #1991 from jbd1986/master-split-cmdline-special-items
Apply GatewayUseSameCredentials logic to RDP file parsing as well
2014-07-25 10:40:33 -04:00
Justin DeFields
2e859a5d14 Removed GatewayUseSameCredentials logic from cmdline.c, and placed it after both cmdline and rpd file have been parsed. This provides proper GatewayUseSameCredentials support for the rdp file 2014-07-24 16:07:14 -04:00
Marc-André Moreau
c544e9ee9f Merge pull request #1990 from nfedera/fix-2014-07-24-01
winpr/sync: Added InitOnceExecuteOnce plus CTest
2014-07-24 15:34:06 -04:00
Norbert Federa
fae8f6fbf2 winpr/sync: Added InitOnceExecuteOnce plus CTest 2014-07-24 21:12:59 +02:00
Hardening
fb4a64bc4a Merge pull request #1989 from bmiklautz/feat/fast-path
core: improve fast-path multifragment handling
2014-07-24 18:10:50 +02:00
Bernhard Miklautz
bdad9524dc refactor transport_read_pdu and check_fds
transport_check_fds and transport_read_pdu had almost the same
functionality: reading and validating one pdu at a time.

Now transport_read_pdu reads one pdu from the transport layer and verifies
that the pdu data is valid - as before.
transport_read_pdu also ensures that the stream is sealed and
rewound when the pdu is received completely.
transport_check_fds just uses transport_read_pdu and does *not* do
the verification a second time based on the stream.

Besides the clean up this fixes the following problems:

* transport_read always read 4 bytes. Fast-path input synchronize pdus
  are only 3 bytes long. In this case on byte got lost in the stream
	buffer which lead to "de-synchronization" of server and
	client.

* Size check in tpdu_read_connection_confirm - already read bytes
  weren't taken into account.
2014-07-24 16:34:59 +02:00
Bernhard Miklautz
47dd22ba87 transport refactor
rename transport_read to transport_read_pdu. This name is more
descriptive what the function actually does.
2014-07-24 16:34:59 +02:00
Bernhard Miklautz
2bb0659fb4 core: improve fast-path multifragment handling
* make sure fast-path packages are not fragmented if no
  multifragment support was announced
* handle special server side case where the multifragment size
  received from the client is smaller than one maximum fast-path
  PDU size
2014-07-24 16:29:46 +02:00
Bernhard Miklautz
f9fbbe23ff Merge pull request #1973 from floppym/file-modes
Remove execute bit from many files
2014-07-23 01:00:00 +02:00
Mike Gilbert
ae1fdf6153 Remove execute bit from many files 2014-07-20 00:52:35 -04:00
Bernhard Miklautz
18ead81b47 Merge pull request #1970 from dbungert/cipher
Add arguments for managing tls ciphers & netmon
2014-07-18 11:14:18 +02:00
Marc-André Moreau
128a21a273 Merge pull request #1971 from awakecoding/master
Win32 Visual Studio Version + Toolset Fixes, makecert improvements
2014-07-17 17:46:15 -04:00
Marc-André Moreau
19c25cf2b4 winpr-pool: fix header on non-Windows 2014-07-17 17:34:51 -04:00
Marc-André Moreau
7b80187cdc Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-07-17 17:30:36 -04:00
Marc-André Moreau
a23d5ea527 winpr/makecert: improve command line options 2014-07-17 16:47:29 -04:00
Marc-André Moreau
e6f4754ed3 winpr: improve windows builds across visual studio versions and toolsets 2014-07-17 15:11:04 -04:00
Marc-André Moreau
4f4603133e winpr: fix build on Windows with unit tests 2014-07-17 12:02:47 -04:00
Daniel Bungert
625f7c3c22 Add arguments for managing tls ciphers & netmon
This adds 2 arguments:
    /tls-ciphers                List of permitted openssl ciphers - see ciphers(1)
    /tls-ciphers-netmon         Use tls ciphers that netmon can parse

With KB2919355, client/server negotiate the use of
TLS cipher TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
which works fine except that netmon can't parse it.
By adding commandline /tls-ciphers-netmon, we restrict
the available ciphers to a list that netmon can
deal with.  Also adds /tls-ciphers, which
accepts a string arg, for further customization.
2014-07-17 06:59:06 -06:00
Marc-André Moreau
0fb3bf1dfd winpr/tools/makecert: add pfx support 2014-07-16 17:13:02 -04:00
Bernhard Miklautz
c4c8a3fca7 Merge pull request #1967 from nfedera/fix-2014-07-16-01
core: addd missing PlaySound server callback
2014-07-16 16:17:20 +02:00
Norbert Federa
8482eed323 core: addd missing PlaySound server callback 2014-07-16 15:38:10 +02:00
Bernhard Miklautz
caeea1cbcd Merge pull request #1961 from g-reno/master
android toolchain and CMakeLists.txt update
2014-07-16 11:26:00 +02:00
Vic Lee
0ba59c842d echo: add server echo channel api. 2014-07-15 11:42:12 +08:00
Vic Lee
8df60ecbe4 tls: fix some error handling. 2014-07-15 11:36:35 +08:00
Gerry Reno
3bd1f4898d android CMakeLists.txt: added else clause to test for v7 appcompat 2014-07-14 08:53:20 -04:00
Vic Lee
29cb8680ce server: allow partial channel read (fix rdpsnd). 2014-07-14 20:00:38 +08:00
Gerry Reno
6ecb8131a4 android toolchain: add back setting of ANDROID_SDK 2014-07-14 07:58:32 -04:00
Bernhard Miklautz
f01daa8d06 Merge pull request #1960 from akallabeth/android-build-script-fix
Android build setup script fixes
2014-07-14 10:49:07 +02:00
Bernhard Miklautz
bf835c54d8 Merge pull request #1958 from akallabeth/android-bookmark-fix
Android bookmark fix
2014-07-14 10:47:40 +02:00
Gerry Reno
d06ed2fa2f android CMakeLists.txt: added support for both 'support' and 'compatibility' in support library path for v7 appcompat
supports path styles:
$ANDROID_SDK/extras/android/support/v7/appcompat
$ANDROID_SDK/extras/android/compatibility/v7/appcompat
2014-07-13 14:54:48 -04:00
Gerry Reno
9fa451428b cmake: android toolchain set ANDROID_DEFAULT_NDK_API_LEVEL 9 2014-07-13 08:40:58 -04:00
Gerry Reno
a640428905 cmake: android toolchain update to latest upstream
AndroidToolchain.cmake: updated from https://github.com/taka-no-me/android-cmake/raw/master/android.toolchain.cmake
2014-07-13 08:34:48 -04:00
Armin Novak
0e61cd296c * Fixed android setup script, if run as update. (git fetch instead of git pull)
* Checking return of openssl build now and inform about build errors.
2014-07-13 13:35:11 +02:00
Marc-André Moreau
4d3ea77972 Merge pull request #1917 from SBoyNumber1/BitmapCacheV3OnAndroid
Added detect of uncompressed data in CACHE_BITMAP_REV3_ORDER. According ...
2014-07-11 16:35:11 -04:00
Marc-André Moreau
61b35e2e8f Merge pull request #1948 from jbd1986/fix-french-canadian
I am making several changes to clean up French Canadian keyboard defs.
2014-07-11 16:34:43 -04:00
Armin Novak
ba296e5f92 Removed unused code. 2014-07-11 18:49:40 +02:00