Commit Graph

220 Commits

Author SHA1 Message Date
Bernhard Miklautz
b8415af0d8 Fix compiler warnings.
This commit is based on pull request #1493
2014-07-29 05:22:29 +02: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
Armin Novak
ad3255354d Added WITH_LIBRARY_VERSIONING, allowing to build shared libraries without
SOVERSION information. (required by Android)
2014-07-11 11:53:58 +02:00
Bernhard Miklautz
6a49bcfe40 winpr: always build "monolitic"
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.

The only exception is winpr-makecert-tool which is still build as extra
library.

This obsoletes complex_libraries for winpr.
2014-07-10 11:10:58 +02:00
Marc-André Moreau
ac7d23b9a3 libfreerdp-gdi: migrate to _aligned_malloc/_aligned_free 2014-07-08 15:07:19 -04:00
Emmanuel Ledoux
9217de3bb1 winpr-utils: WLog_PrintMessageVA, include stdarg.h from wlog.h instead of wlog.c 2014-07-04 14:52:13 +02:00
Marc-André Moreau
78d3c82798 xfreerdp: fix multiple egfx-related memory leaks 2014-06-20 13:52:13 -04:00
Marc-André Moreau
ce6ff35297 xfreerdp: fix egfx off-by-one errors 2014-06-19 17:08:50 -04:00
Marc-André Moreau
42c83c25f8 Merge branch 'egfx' of github.com:awakecoding/FreeRDP into egfx
Conflicts:
	channels/tsmf/client/tsmf_main.c
2014-06-12 12:08:15 -04:00
Armin Novak
fb4fd9f5bb Added stream pool shrinking if large parts are unused. 2014-06-11 14:38:20 +02:00
Armin Novak
4325741583 Merge remote-tracking branch 'origin/master' into tsmf-gstreamer-1.0
Conflicts:
	client/X11/xf_client.c
2014-06-11 11:27:08 +02:00
Marc-André Moreau
c5a1a8ac27 libwinpr-sspi: fix native sspi build 2014-06-05 22:10:08 -04:00
Marc-André Moreau
1ddd6c5e0d libwinpr-utils: add WLog support for Win32 debugger console output 2014-05-31 10:10:19 -04:00
Marc-André Moreau
5b0a5dd3f1 libwinpr-utils: add WLOG_PREFIX environment variable 2014-05-29 15:42:32 -04:00
Marc-André Moreau
e5a77c3105 libwinpr-utils: add support for fine grained wlog filter 2014-05-29 15:23:15 -04:00
Marc-André Moreau
af6fb83d3b libwinpr-utils: extend wlog prefix format 2014-05-28 10:38:32 -04:00
Marc-André Moreau
ba5d84ee5c libwinpr-smartcard: add logging for each calls in smartcard inspector 2014-05-26 17:54:39 -04:00
Armin Novak
309405592e Fixed broken ArrayList_Remove and ArrayList_RemoveAt functions, freeing element now. 2014-05-23 13:43:14 +02:00
Marc-André Moreau
b8d60d5715 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2014-05-10 10:59:56 -04:00
Marc-André Moreau
fb3662c7e2 winpr: fix ranlib missing symbols warnings on OS X 2014-05-09 22:44:19 -04:00
Hardening
50f1f0df6f Add some const modifiers
This allows these functions to be used with const buffers.
2014-05-09 22:36:50 +02:00
Marc-André Moreau
a202fe4057 freerdp: fix several type related warnings 2014-05-08 18:02:02 -04:00
Marc-André Moreau
4460a1a7cf libwinpr-utils: flush file after each write in wlog 2014-05-05 18:04:20 -04:00
Marc-André Moreau
c2a59c23a7 libfreerdp-core: fix potential crash on session redirection failure 2014-04-28 16:44:52 -04:00
Marc-André Moreau
b67288868d Merge branch 'master' of github.com:awakecoding/FreeRDP into fdsapi 2014-04-27 19:18:23 -04:00
Zhang Zhaolong
196f5315ae libwinpr: fix memory leak in case realloc() failed. 2014-04-26 11:32:51 +08:00
Zhang Zhaolong
66dfc4fd5b winpr: fix error malloc size. 2014-04-25 21:14:10 +08:00
Bernhard Miklautz
b817e92e5e cmake: mark required libraries for export 2014-04-23 10:16:02 +02:00
Hardening
ef11358668 Enhance ListDictonnary
This patch enhances ListDictionnary so that you can set callbacks for
keys and for values.
2014-04-18 18:26:04 +02:00
Hardening
6febe88026 Fixes for queue and stack
This patch does misc fixes in queue and stack:
* the *_new() were not handling OOM correctly ;
* the *_Contains() methods were not using the equals cb;
* the lock were not always taken when accessing internal members;
2014-04-18 16:27:51 +02:00
Marc-André Moreau
0059772efa Merge pull request #1789 from MartinHaimberger/mh-memfixes
Fixed misc leaks
2014-04-14 14:17:30 -04:00
Marc-André Moreau
edb3ad383e Merge pull request #1784 from hardening/collections_reallocs
Don't leak memory when realloc fails
2014-04-14 14:17:05 -04:00
Marc-André Moreau
d699128a57 channels/smartcard: add more debug output 2014-04-13 15:50:51 -04:00
Martin Haimberger
dd62e88098 fixed Wlog_Uninit to also free child logger 2014-04-11 02:23:16 -07:00
Hardening
31c77baba0 Don't leak memory when realloc fails 2014-04-09 21:53:42 +02:00
Marc-André Moreau
2c016bf2b0 Merge branch 'master' of github.com:FreeRDP/FreeRDP into smartcard 2014-04-09 10:41:05 -04:00
Hardening
36b4f20ff8 Fixes in case of OOM 2014-04-09 15:26:43 +02:00
Marc-André Moreau
2aa248853a channels/smartcard: cancel outstanding IRPs on re-initialization 2014-04-05 17:15:17 -04:00
Marc-André Moreau
8cdb3576c2 Merge branch 'master' of github.com:awakecoding/FreeRDP into smartcard
Conflicts:
	channels/smartcard/client/smartcard_main.c
2014-04-02 18:27:31 -04:00
Marc-André Moreau
64b550e18f libwinpr-utils: fix .ini parser whitespace trimming 2014-03-25 00:32:05 -04:00
Marc-André Moreau
43031d6b66 libwinpr-utils: improve .ini file parser 2014-03-24 22:41:30 -04:00
Marc-André Moreau
331209f02d libwinpr-utils: start new .ini config file parser 2014-03-24 18:20:34 -04:00
Marc-André Moreau
882f3098b3 libfreerdp-codec: add more NCrush tables, decode literals and CopyOffsets 2014-03-16 15:51:35 -04:00
Marc-André Moreau
c2d8486d8a libwinpr-utils: convert BitStream to macros 2014-03-11 22:17:31 -04:00
Marc-André Moreau
c686d434b7 libfreerdp-codec: initial RDP4/RDP5 MPPC compression test case success 2014-03-09 17:32:49 -04:00
Marc-André Moreau
d9a2fb4ff9 libfreerdp-codec: start MPPC compressor 2014-03-08 17:38:47 -05:00
Marc-André Moreau
dbe7e7aae2 libwinpr-utils: move BitStream functions to macros 2014-03-05 13:08:11 -05:00
Marc-André Moreau
3ba1d1ff4e libwinpr-utils: basic working UINT32-based bitstream implementation 2014-03-05 12:56:26 -05:00
Marc-André Moreau
3973775b69 libwinpr-utils: add MSB/LSB bit printing 2014-03-05 12:03:10 -05:00
Marc-André Moreau
2cd9649f37 libwinpr-utils: start new BitStream util 2014-03-04 18:15:03 -05:00