Commit Graph

1459 Commits

Author SHA1 Message Date
Marc-André Moreau
4f769866d7 winpr: make clean non-OpenSSL build possible (without schannel, makecert) 2015-10-09 15:57:41 -04:00
Marc-André Moreau
82afb0f1ee libwinpr-crypto: add generic digest API and OpenSSL compatible key derivation 2015-10-09 15:23:15 -04:00
Marc-André Moreau
54292f29ea libwinpr-crypto: add generic cipher API with OpenSSL/mbedtls support 2015-10-09 12:15:31 -04:00
Marc-André Moreau
87c42127c7 libwinpr-sspi: remove OpenSSL dependency in NTLM SSPI module 2015-10-08 16:48:58 -04:00
Marc-André Moreau
5bff1d0fdf libwinpr-crypto: add rand and RC4 functions with OpenSSL/mbedtls 2015-10-08 16:26:37 -04:00
Marc-André Moreau
7521ecd759 libwinpr-crypto: add basic hashing and HMAC support with OpenSSL/mbedTLS 2015-10-08 13:58:55 -04:00
Marc-André Moreau
ac62d43e0f winpr: isolate OpenSSL 2015-10-06 10:56:24 -04:00
Marc-André Moreau
94a2f9533e winpr: start porting to non-OpenSSL 2015-10-05 16:23:44 -04:00
Marc-André Moreau
e1e4d2ae98 Merge pull request #2827 from HenryJacques/winpr_cleanup
Remove unused variable in RegQueryValueExA()
2015-08-27 10:11:50 -04:00
Armin Novak
1abd652530 Fixed GetComputerNameExA and GetComputerNameA. 2015-08-25 17:43:22 +02:00
HenryJacques
e9a7da3b4e Remove unused variable 2015-08-05 18:38:50 +02:00
Martin Haimberger
008d9f3b79 fixed misc *_free functions to accept NULL
Following types of collections support now
NULL in the free call:

* ArrayList
* BitStream
* ContdownEvent
* Dictionary
* KeyValuePair
* MessageQueue
2015-07-30 07:02:36 -07:00
Martin Haimberger
479157b69c winpr: WaitFor*Ojbect/s set lastError now 2015-07-30 02:52:11 -07:00
Marc-André Moreau
611c194f80 Merge pull request #2801 from bmiklautz/fix/thread
winpr/thread: small cleanups
2015-07-28 08:47:06 -04:00
Marc-André Moreau
b33ea8aee9 Merge pull request #2804 from bmiklautz/fix/misc
Misc fixes
2015-07-28 08:46:27 -04:00
Marc-André Moreau
06c3f2fca4 Merge pull request #2793 from rkondratenko/pcsclite-transactions
Fix for transactions support for Smart Cards
2015-07-28 08:44:58 -04:00
Bernhard Miklautz
c3ea07f3d9 winpr/thread: don't close invalid file descriptors
In case the file descriptor is -1 don't call close.
2015-07-24 14:57:47 +02:00
Bernhard Miklautz
81d422588e winrp/thread: don't call pthread_exit on return
As the pthread_exit man page states pthread_exit is called implicitly
when the start function returns.
2015-07-24 14:52:31 +02:00
Bernhard Miklautz
4250f3f030 winpr/event: remove critical section
The critical section isn't required and not used anymore since
commit 8a2220a3d9.
2015-07-24 13:29:48 +02:00
Bernhard Miklautz
ca150f2255 winpr/thread: small cleanups
Also adds error checking of winpr_StartThread in winpr_StartThread.
2015-07-23 11:52:49 +02:00
Rostislav Kondratenko
3f81ff87a6 Removing private context on hCard so that transaction will properly unlock when context is released. 2015-07-17 18:13:41 +03:00
Rostislav Kondratenko
f2863fabf5 Re-enabled PCSC-Lite transactions and fixed smartcard deinitialization so it will release all contexts to unblock calls waiting for transactions 2015-07-17 16:37:44 +03:00
Armin Novak
9af2e22d51 Fixed mutex unlocking and return checks. 2015-07-16 17:07:29 +02:00
MartinHaimberger
b06d83ba80 Merge pull request #2766 from akallabeth/snprintf_to_sprintf_s
Replaced snprintf with sprintf_s
2015-07-15 09:47:43 +02:00
Bernhard Miklautz
68e8569110 winpr/synch: remove the dependency on winsock.h
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
2015-07-14 11:39:41 +02:00
Armin Novak
cf9f975341 Replaced snprintf with sprintf_s 2015-07-03 13:26:15 +02:00
Armin Novak
776f15e135 Fixed inverted bAttached setting.
If bAttached is TRUE, the resources of the event are not
cleaned up on CloseHandle.
2015-07-03 12:42:04 +02:00
Armin Novak
c21de0dae6 Fixed pr comments. 2015-07-03 11:13:48 +02:00
Armin Novak
d18b0fbeb4 Handle API updated. 2015-07-03 09:52:52 +02:00
Armin Novak
77204aa6b6 WSAEventSelect: Handle lNetworkEvents == 0
WSAEventSelect did ignore the lNetworkEvents argument.
In case this argument is 0, the non blocking socket must
be set to blocking again to mimic windows behavior.
2015-07-03 09:29:36 +02:00
Armin Novak
6243a9374b Added write event support to handle functions.
Allows the WinPR HANDLE functions WaitForSingleObject and
WaitForMultipleObjects to signal in case of write events.
This is used by CreateFileDescriptor and SetEventFileDescriptor,
which got an API change accomodating for this new feature.
2015-07-03 09:29:18 +02:00
Armin Novak
7dc96c412f Added convenience function winpr_log_backtrace. 2015-07-03 09:22:02 +02:00
Bernhard Miklautz
c7adb569ff CreateProcess: fix setting of default handler
If SA_SIGINFO isn't set in the flags sa_handler is used
instead of sa_sigaction.

This fixes also the compiler warning:

FreeRDP/winpr/libwinpr/thread/process.c: In function ‘_CreateProcessExA’:
FreeRDP/winpr/libwinpr/thread/process.c:282:20: warning: assignment from
       incompatible pointer type [enabled by default]
2015-07-02 12:25:48 +02:00
Bernhard Miklautz
be53e9e029 CreateProcess: two fixes
* change to lpCurrentDirectory if set even if no token was supplied
* fix wrong check - add missing !

This was part of akallabeth's PR #2714.
2015-07-02 12:05:46 +02:00
Norbert Federa
c84e90bf06 winpr: fix CreateProcess signal handler issues
The calling thread of CreateProcess can be in any library and
can have arbitrary signal masks and handlers.

We now save the caller's mask and  block all signals before forking.
After fork:
- child resets the handlers and unblocks all signals.
- parent restores the caller's original signal mask.
2015-07-02 11:28:06 +02:00
Armin Novak
78eeb861d5 Fixed mixed declarations and code. 2015-07-01 16:20:56 +02:00
Norbert Federa
1c43a6e115 Merge pull request #2738 from bmiklautz/ffuncs
hardening: check fread and fwrite return values
2015-07-01 13:02:32 +02:00
Bernhard Miklautz
1cee185e3c hardening: check fread and fwrite return values 2015-06-26 20:38:30 +02:00
Marc-André Moreau
5ec19d2045 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2015-06-26 14:00:03 -04:00
Norbert Federa
ac95b7274e Merge pull request #2727 from akallabeth/leak_fixes_reformat
Fixed leaks, NULL dereferences and broken init.
2015-06-26 15:01:08 +02:00
Hardening
b411c11f6e Merge pull request #2729 from akallabeth/win_reg_key_by_vendor_product_define
Replaced hard coded registry keys with cmake defines.
2015-06-26 11:15:09 +02:00
Armin Novak
b81aaa9cc2 Fixed mutex trylock in MutexCloseHandle. 2015-06-25 12:24:28 +02:00
Bernhard Miklautz
cbbc680131 clipboard: fix of by one error on cleanup 2015-06-25 11:53:03 +02:00
Armin Novak
e8bfa29bd2 Replaced registry keys with cmake defines. 2015-06-24 14:02:48 +02:00
Bernhard Miklautz
9f6fa7ef4c Fix possible endless loops on cleanup.
Some cleanup code possibly create endless loops because an unsigned
type was used as run variable but the check was >= 0 in the for loop.
2015-06-24 12:26:13 +02:00
Armin Novak
6ed7b7b4b3 Fixed a resource leak. 2015-06-24 09:29:52 +02:00
Armin Novak
f177430acc Fixed a resource leak. 2015-06-24 09:29:13 +02:00
Armin Novak
6698e24228 Fixed leaks, NULL dereferences and broken init. 2015-06-23 21:29:21 +02:00
Armin Novak
fbbc1affd0 ifdef variables used with specific build options. 2015-06-23 16:20:59 +02:00
Armin Novak
063b10e8e4 Fixed memory leak. 2015-06-23 12:30:19 +02:00