Commit Graph

1085 Commits

Author SHA1 Message Date
akallabeth
7faf18d9dd Updated flags required by [MS-RDPERP] 2022-06-29 11:41:45 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
fifthdegree
c51348a33b fixes 2022-06-21 10:27:17 +02:00
fifthdegree
e66b99f8dc deprecate old hash callback field 2022-06-21 10:27:17 +02:00
fifthdegree
6d3aa52496 set SAM file and hash callback on credential rather than context 2022-06-21 10:27:17 +02:00
fifthdegree
eeece1a027 server-side kerberos (and some fixes) 2022-06-21 10:27:17 +02:00
fifthdegree
1c012b09b8 implement proper SPNEGO negotiation 2022-06-21 10:27:17 +02:00
akallabeth
f25261e271 Unifiy string append functions 2022-06-17 08:41:46 +02:00
Marc-André Moreau
1d5c0be5ec Add settings to load a custom SSPI shared library module 2022-06-01 15:16:12 +02:00
akallabeth
4c452a96c4 Fixed broken #define guards 2022-05-12 11:36:01 +02:00
David Fort
77413f49b2 winpr: rework alignment functions
_align_XXX functions aren't widely available depending on the C runtime. That causes
problems with mingw where we can easily have some runtime mixes (which lead to mysterious
segfaults most of the time). This patch introduce winpr_aligned_XXX functions that will
either use the function available, or use an emulation layer.
2022-05-12 11:36:01 +02:00
David Fort
a612ca4ba2 winpr: fix unitary test when CreateProcess is CreateProcessW
As the second argument of CreateProcessW is modified to split with spaces and so
this can not be a const arg.
2022-05-05 13:11:18 +02:00
akallabeth
6ce3499e13
Settings getter tests (#7869)
* Added tests for freerdp_[static|dynamic]_collection_* functions

* Added settings unit test for clone functions

* Fix argument for winpr_RAND and winpr_RAND_pseudo

Using void* eliminates all assumptions of which type the buffer is.
This eliminates unnecessary warnings.
2022-05-02 11:39:38 +02:00
akallabeth
9330559d24 Defined and use _write 2022-04-29 14:27:44 +02:00
akallabeth
00b00ea521 Added unwind.h support 2022-04-29 14:27:44 +02:00
akallabeth
860f44f762 CMake check_include and struct cleanup
Move to WinPR what should be there.
2022-04-29 14:27:44 +02:00
akallabeth
d63817640f Fixed ArrayList_SetItem, return success 2022-04-28 12:37:19 +02:00
akallabeth
2dfc1ddb12 Removed obsolete trio 2022-04-28 10:49:09 +02:00
akallabeth
667b471686 Fixed cast-quality warnings 2022-04-28 09:17:20 +02:00
Armin Novak
2dc98adb62 Updated _wcschr and _wcsrchr to match MSDN spec 2022-04-27 19:42:04 +02:00
Armin Novak
5482607b15 Added Stream_PointerAs
This macro allows retrieving the stream pointer casted to correct
type.
2022-04-27 19:42:04 +02:00
Armin Novak
08035be41b Added missing WINPR_API 2022-04-25 16:06:34 +02:00
akallabeth
74c1a006e9 Fixed format string for Stream_CheckAndLogRequiredLength
__LINE__ requires %d and not %PRIuz
2022-04-23 10:10:09 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
David Fort
f232562d8b smartcard: take in account the module path for listing smartcards
The PKCS1 module was taken only for the kerberos part.
Also make as exported the winpr_NCryptOpenStorageProviderEx function.
2022-04-15 09:06:09 +02:00
akallabeth
47bd162065 Added function sspi_SetAuthIdentityW 2022-03-28 15:52:59 +02:00
akallabeth
905609381f Unified sspi_FreeAuthIdentity 2022-03-28 15:52:59 +02:00
Zhengyi Fu
e62aaff319 winpr: add GetFileInformationByHandle 2022-03-24 13:40:31 +01:00
Mike Gabriel
d337ea9c16 winpr/{libwinpr/thread/thread.c,include/winpr/thread.h}: Keep DumpThreadHandles as a symbol even if WITH_DEBUG_THREADS is OFF. 2022-03-08 09:16:10 +01:00
Armin Novak
d1f8c00f7b Fixed duplicated symbols 2022-03-03 11:26:48 +01:00
Armin Novak
6ed50b4b1d Refactored WinPR includes 2022-03-03 11:26:48 +01:00
Armin Novak
001c505572 Const corrected function sspi_CopyAuthIdentity 2022-02-24 14:48:46 +01:00
Armin Novak
f4572b082a Use typedef struct definition for sspi types 2022-02-24 08:52:25 +01:00
David Fort
0435b5a65d Implement smartcard logon 2022-02-24 08:52:25 +01:00
David Fort
310f2047bf fix build with mingw 7 2022-02-24 08:52:25 +01:00
Armin Novak
99d63ea89e Fixed missing static and WINPR_API 2022-02-24 08:52:25 +01:00
David Fort
cb351a099d Enable smartcard NLA logon 2022-02-24 08:52:25 +01:00
David Fort
a563a6836b winpr: ncrypt add a property to retrieve the PKCS11 slotId 2022-02-24 08:52:25 +01:00
akallabeth
f568d70d52 Fixed guards 2022-02-18 08:38:28 +01:00
Armin Novak
bf9f1eccc1 Fixed issued with mingw build 2022-02-18 08:38:28 +01:00
Armin Novak
5f8ab14f3f Cleaned up registry value reading, added warnings 2022-02-15 13:43:36 +00:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak
77580466ae Removed cached wlog pointer 2022-02-01 11:04:32 +00:00
Armin Novak
1c2bf9f031 Made HRESULT_FROM_WIN32 a static inline 2022-02-01 11:04:32 +00:00
Armin Novak
ccaf3c938c Added Stream_ConstPointer 2022-02-01 10:25:37 +00:00
Armin Novak
10e40147fb Fixed various const warnings 2022-02-01 10:25:37 +00:00
Armin Novak
a40467b3b0 Added Stream_ConstBuffer function 2022-02-01 10:25:37 +00:00
Armin Novak
02896b0656 Fixed warnings from WLOG_ASSERT 2022-02-01 08:48:21 +01:00
Armin Novak
ca30e749e9 Fixed unused-but-set-variable and reserved identifier warnings 2022-02-01 08:48:21 +01:00
Armin Novak
bc08ebc01c Corrected const arguments for wStream functions
Functions only extracting values now use const for wStream argument
2022-01-31 16:13:06 +01:00
Armin Novak
6fc260b285 Fixed integer range warnings, added tests 2022-01-31 16:13:06 +01:00
Armin Novak
d4e557122b Fixed constant definitions
Define signed values instead of raw values
2022-01-31 16:13:06 +01:00
Armin Novak
92c3fd5d59 Fixed unnecessary cast in headers 2022-01-31 16:13:06 +01:00
Armin Novak
0feee85952 Fixed cast warnings due to defines 2022-01-31 16:13:06 +01:00
Armin Novak
03e454d7d0 Fixed missing brace 2022-01-31 15:55:10 +01:00
Armin Novak
e7913b4720 Fixed some reserved names 2022-01-31 15:55:10 +01:00
akallabeth
e6e6ed5dbd Cleaned up PubSub
* Callback arguments now const
* Fixed missing includes
2022-01-19 09:24:57 +01:00
David Fort
130f191392 winpr: fix some string constant in ncrypt and add reader property
Some WCHAR string constant were wrong (missing \x00 at the end).
The commit also implements the NCRYPT_READER_PROPERTY property in the pkcs11 provider.
2022-01-17 16:27:53 +01:00
David Fort
eb53b9913a winpr: interpret the scope paramater in NCryptEnumKeys
Although the official documentation claims that pszScope parameter shall be set to
NULL. In practice setting it to \\.\<reader name>\ allows to filter on the corresponding
reader.
2022-01-17 16:27:53 +01:00
Marc-André Moreau
55be5f8bb0 Fix Windows Unicode handling of environment variables 2022-01-11 12:32:14 +01:00
David Fort
599bc18f33 winpr: fix bcrypt.h string constants 2022-01-10 11:02:45 +01:00
David Fort
bfe8b464be winpr: fix and enhance ncrypt
This patch adds the NCryptEnumStorageProviders function.
It also fixes strings bugs with the compiler taking the WCHAR "Micro" string
M\x00i\x00c\x00r\x00o\x00 as
M\x00i\x0c\x00r\x00o\x00, and so generating unexpected behaviours. The solution is
to split string constants when you hit a character that is a valid hex number, so
that the compiler doesn't interpret i\x00c\x00 (ic in WCHARs) as i\x0c\x00 (weird
string).
2022-01-10 11:02:45 +01:00
Armin Novak
98348ef62a Removed ndr.h from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
ed9cc8c1cc Removed heap module from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
4f0f8e9f8c Removed credentials module from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
5365b2f5f0 Removed midl.c|h from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
3de6af34ed Removed unused module winhttp 2021-12-23 14:27:12 +01:00
Armin Novak
379aeed24e Removed unimplemented credui module 2021-12-23 14:27:12 +01:00
Armin Novak
a713d5417e Remove unimplemented wnd module 2021-12-23 14:27:12 +01:00
Armin Novak
b30f8886b2 Fixed LinkedList const correctness 2021-12-15 13:36:15 +01:00
David Fort
d4020e2328 winpr: implement ncrypt API
This implements the emulation for the ncrypt API and more specifically the smartcard
provider so that we can list available keys and certificates using pkcs11-helper.
2021-12-14 14:12:01 +01:00
David Fort
a6cadd6f97 winpr: fix compilation for mingw
Depending on the version of mingw some export macro aren't always defined.
2021-12-14 14:12:01 +01:00
akallabeth
d1adfd5ecc Fixed check for TARGET_OS_IPHONE and TARGET_OS_WATCH 2021-11-25 12:25:18 +01:00
David Fort
67986ea298 Fix compilation with mingw
This patch addresses some issues when compiling against mingw. With these changes
FreeRDP can be compiled out-of-the box on a Ubuntu 20.04.
2021-11-15 09:23:16 +01:00
Armin Novak
68eb6e4afc Drop ASN1 module stub
Not implemented, just creates confusion.
2021-11-02 15:13:20 +01:00
Armin Novak
319b0e1b7e Queue_Enqueue const argument
By default use const for the object enqueued.
If a `fnObjectNew` function is set, it is copied anyway.
For the case without cast away the const internally.
2021-10-18 16:09:13 +02:00
akallabeth
3ccb96d52f Fixed #7350: Warnings with Stream_StaticInit
* Properly initialize the stream buffer
* Add Stream_StaticConstInit accepting a const buffer
* Modify API to return a pointer to the stream initialized
2021-10-14 12:11:16 +02:00
Armin Novak
439ec62cff Hide implementation of certain stream functions 2021-10-06 09:49:07 +02:00
Armin Novak
18a3fcf2fc Updated wStream API and added torough checks
* Do length/capacity checks in every read/write/seek function
  if WINPR_ASSERT is defined.
* Ensure s->pointer is valid, e.g. within s->buffer + s->capacity
  (Stream_Rewind, Stream_Seek, ...)
* Add return values to Stream_Set* functions so inalid arguments
  can be reported to the caller
* Deprecated problematic stream manipulation functions
  (Stream_SetBuffer, Stream_SetPointer, Stream_SetCapacity)
* Ensure length/capacity functions never return a value larger
  than the actual length/capacity
2021-10-06 09:49:07 +02:00
akallabeth
cb5ccec212 Cleaned up some possible race conditions with threads
* ExitThread no longer NORETURN, this eases handling of threads.
* Fixed a (rare) race condition when starting a thread
* Made global thread_list optional (you lose the exit code from
  ExitThread)
2021-09-20 10:59:59 +02:00
akallabeth
76979a47fb Added new CMake option to dump event handles in use 2021-09-20 10:59:59 +02:00
akallabeth
d80b418bbc Added object copy support to queue
* Added object copy support to Queue_Enqueue
* Added Queue_Discard to clear the top of the queue
* Added some doxygen for queue functions.
2021-09-20 10:59:59 +02:00
Armin Novak
0fe1e2359e Fixed all reserved-id-macro warnings 2021-09-10 08:16:25 +02:00
Armin Novak
ba0da04217 Fixed compilation warnings and duplicate defines 2021-09-09 08:53:20 +02:00
Armin Novak
9f0eff604e Silence GCC reserved-id-macro warnings in compatibility header 2021-09-09 08:53:20 +02:00
Armin Novak
0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
Armin Novak
fbae9ba88c Added LoadLibraryX and LoadLibraryExX
These functions take a UTF8 string and load a library with
LoadLibraryW under windows.
2021-09-03 08:29:15 +02:00
Armin Novak
737f5a2036 Fixed argument const correctness 2021-08-27 13:21:02 +02:00
akallabeth
f1bde376b1
Raw channel send (#7255)
* Added raw channel data write function

* Use nego_set_state

* Added ArrayList_ForEachAP

* Provide va_copy for older VS compilers
2021-08-26 16:17:51 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak
cbb06a7c17 Fixed DsParse implementations and tests
* Implemented DsMakeSpnW
* Removed unimplemented DsCrackSpnA and DsCrackSpnW
2021-08-24 10:45:57 +02:00
Armin Novak
af0ce13d8a Removed not implemented module 2021-08-24 10:45:57 +02:00
Fabrice Fontaine
0976cce458 winpr/include/winpr/file.h: fix build on uclibc
Include stdio.h to fix the following build failure with uclibc raised
since version 2.4.0 and
eb6777ea69:

In file included from /tmp/instance-0/output-1/build/freerdp-2.4.0/winpr/libwinpr/utils/lodepng/lodepng.c:30:
/tmp/instance-0/output-1/build/freerdp-2.4.0/winpr/include/winpr/file.h:524:11: error: unknown type name 'FILE'
 WINPR_API FILE* winpr_fopen(const char* path, const char* mode);
           ^~~~

Fixes:
 - http://autobuild.buildroot.org/results/31e770a330158035e24b7b952bec0030138482b7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-08-01 09:37:24 +02:00
akallabeth
534d30beb3
No deprecated (#7107)
* Removed cmake options disabling compiler warnings

* Added deprecation compile options

* Fixed android client use of deprecated symbols

* Removed obsolete callback
2021-06-22 14:39:10 +02:00
akallabeth
b453d5e40e Fixed rdtk, uwac and winpr standalone builds 2021-06-22 08:54:18 +02:00
Armin Novak
09cf11ecf0 WinPR: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
Armin Novak
2e0d1cc33c Fixed integer warnings, fixed data types 2021-06-17 10:35:22 +02:00
Armin Novak
299c962b28 Fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak
d9a8083ddf Added WINPR_NORETURN, fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak
1af7ef2f1b Fixed compilation warnings and typos 2021-06-16 15:21:56 +02:00
Armin Novak
9e94f1dace Improve WINPR_ASSERT, log backtrace 2021-06-16 14:26:06 +02:00
Armin Novak
f5bb6d12fc Fixed compilation warnings 2021-06-16 14:26:06 +02:00
Armin Novak
1b3adfae0a Added WINPR_ASSERT to Stream and StreamPool 2021-06-16 14:26:06 +02:00
Armin Novak
d7f3ce0acd Added callback deprecation attribute 2021-06-16 14:26:06 +02:00
Armin Novak
bca7bcd8b0 Cleaned up Queue API, use WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak
b9a9f50dd2 Hide HashTable_SetupForStringData implementation 2021-06-16 11:46:42 +02:00
Armin Novak
30776358bb Readded ArrayList_Add and HashTable_Add as deprecated 2021-06-16 11:46:42 +02:00
Armin Novak
96eca171e2 Removed const from HashTable_ForEach function 2021-06-16 11:46:42 +02:00
Armin Novak
d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak
a1c8e4cf85 Refactored ArrayList_Add to conform to other functions 2021-06-16 11:46:42 +02:00
Armin Novak
880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00
Armin Novak
cb642699c8 Modified HashTable API to be opaque
* Reuse wObject function pointers
* Add missing getters/setters
* Clean up return types, const correctness of arguments
2021-06-16 11:46:42 +02:00
akallabeth
3a75228242 Added option do disable WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Armin Novak
b435e6db9b Added WINPR_ASSERT
Added a WinPR macro that can be used for WinPR and FreeRDP to
replace standard C assert.
It is more verbose and logs issues to WLog which makes it easier
for us to trace problems in the field.
2021-06-14 09:37:07 +02:00
Marc-André Moreau
96f07ea993 Windows ARM64 build fixes 2021-06-01 14:18:01 +02:00
Marc-André Moreau
73a931f941 WinPR: don't warn about thread-local storage on iOS, add comment banning its use for new code 2021-05-28 09:57:15 +02:00
Marc-André Moreau
555944f027 run clang-format 2021-05-26 08:40:29 +02:00
Marc-André Moreau
eb6777ea69 Fix Windows Unicode file path handling issues (+add winpr_fopen wrapper) 2021-05-26 08:40:29 +02:00
Biswapriyo Nath
c0c9eb5908 Check MINGW32 for duplicate type declaration. 2021-05-25 09:41:44 +02:00
Armin Novak
6f2c6625e4 Added FREERDP/WINPR prefix to define GIT_REVISION 2021-05-18 13:37:34 +02:00
David Fort
ab4fe21439 winpr: add a HashTable_Foreach function and associated tests
This useful functions allows to browse all value pairs of a hashtable without
having to allocate some memory for keys and then retrieving each element.
It may also make sense with synchronized hashtables because before you were forced to
HashTable_GetKeys() and then HashTable_GetItemValue() which is locking again for each
element of the table.
2021-05-17 09:29:25 +02:00
akallabeth
ab49694101 Added new RDP file options 2021-05-11 07:59:05 +02:00
akallabeth
d4ae65dbb5 Added version to client log, removed build_date 2021-04-22 14:07:37 +02:00
akallabeth
2ea7ac0c06 Unified bin to hex and hex to bin conversion
* Added new functions in WinPR
* Added unit tests for new functions
* Replaced existing (internal) conversion functions
2021-04-19 10:45:21 +02:00
akallabeth
ef6e4c0570
ADDIN_ARGV cleanup, added camera setting to RDP parser (#6947)
* Added camerastoredirect to RDP parser

* Refactored ADDIN_ARGV handling

* Added ADDIN_ARGV unit tests
2021-04-12 10:38:40 +02:00
David Fort
aeba30a505 winpr: correctly implement APC
This patch implements APC functions and fixes waitable timers with completions.
2021-04-07 08:15:16 +02:00
David Fort
dfbbf3b618 winpr: cleanup polling code
Externalize all the polling logic in a pollset component. This patch prepares the
support of APC and alertable state.
2021-04-07 08:15:16 +02:00
sss
6574fdf6e4 reverted changes from clang-format 2021-02-25 14:05:40 +01:00
Gluzskiy Alexandr
bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
akallabeth
43311130a2 Fixed CodeQL warnings 2021-02-19 11:19:49 +01:00
akallabeth
e2fd9db0b5 Added const to function arguments 2021-02-17 11:29:56 +01:00
Armin Novak
54e02e1642 Use wide char file paths for license 2021-02-04 21:22:21 +01:00
Ondrej Holy
d7566f5f5a
client: Fix exit codes for /help and similar option (#6741)
* client: Fix exit codes for /help and similar option

Currently, non-zero exit code is returned for /version, /buildconfig, /help,
/monitor-list, /kbd-list and /kbd-lang-list command-line options for several
clients. This is against conventions because 0 is usually returned in
such cases. Also, there is potentially another problem that the returned
codes overflow on UNIX systems (where the exit code is a number between 0
and 255). Let's fix the clients to return 0 in the mentioned cases to honor
conventions and 1 for the command-line parsing errors (or -1 for clients
who already use that value).

Fixes: https://github.com/FreeRDP/FreeRDP/issues/6686

* Refactored freerdp_client_settings_command_line_status_print_ex

Now returns 0 if help or version information was requested.

* Do not eliminate original error status.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2021-01-22 09:44:55 +01:00
akallabeth
66dc4cc9ee Fixed compilation warnings. 2020-11-10 08:53:43 +01:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Martin Fleisz
b5fa928311 core: Fix race when deleting channel manager
This PR fixes a possible crash when the channel manager was freed and
there were pending messages in the message queue.
The problem was that even though the message queue already received the
WMQ_QUIT message, it was still possible to enqueue messages after this
point. This resulted in unprocessed messages in the queue when it was
deleted. The delete handler then called into channel handlers which
where aleady freed/deleted.
With this PR adding messages after WMQ_QUIT was posted to the message
queue returns an error and all channel messages are now processed before
the channels are closed/terminated.
2020-11-03 17:08:58 +01:00
akallabeth
516fc9b910 Fixed locking issue, removed broken functions 2020-11-02 09:23:11 +01:00
akallabeth
5133c4e424 Corrected name for FD_WRITESTIME 2020-10-15 08:33:14 +02:00
Armin Novak
a22f264189 Added backward compatibility define 2020-10-14 09:19:57 +02:00
Armin Novak
ef1c8a3b50 Updated FD_FLAGS definition. 2020-10-14 09:19:00 +02:00
akallabeth
33df98f204 Fixed definition of FILEDESCRIPTORW 2020-09-22 13:03:55 +02:00
akallabeth
1546a8b655 Fixed naming of FILEDESCRIPTORW 2020-09-18 12:49:54 +02:00
Kobi Mizrachi
920acd4c0e winpr: image: add API to construct bmp header 2020-06-05 09:22:26 +02:00
akallabeth
b9149df1e6 Fixed BehaviourSanitizer warnings in streams. 2020-05-20 15:10:07 +02:00
akallabeth
535ef57e2e Fixed BehaviorSantizer warnings. 2020-05-20 15:10:07 +02:00
akallabeth
ddb388e152 Refactored sam functions to utilize strtok_s 2020-05-18 12:07:59 +02:00
akallabeth
7b1d440945 Refactored StreamPool 2020-05-13 17:11:17 +02:00
akallabeth
8d70a3492b Added warning to all collection structs 2020-05-12 14:05:28 +02:00
akallabeth
844ec8f74c Fixed #6136: Cleaned up Stack API 2020-05-12 14:05:28 +02:00
Armin Novak
a161bafa5f Fix #6066, #6045: Disable spincount by default. 2020-04-13 09:56:19 +02:00
Martin Fleisz
99786970a3
Merge pull request #5884 from akallabeth/smartcard_ndr_strict
Smartcard tighter input validation
2020-03-31 08:34:04 +02:00
Armin Novak
8b85913ac0 Added winpr_md_type_from_string and winpr_md_type_to_string 2020-03-06 11:37:35 +01:00
Armin Novak
9d13729617 Added sha3 hashes for openssl. 2020-03-06 11:37:35 +01:00
Armin Novak
e3acc01bfb Added missing WINPR_*_DIGEST_LENGTH definitions. 2020-03-06 11:37:35 +01:00
Armin Novak
959be9d946 Fixed warnings in pcsc layer 2020-02-20 14:03:29 +01:00
Armin Novak
ef93109f42 Fixes for GetAttrib and some refactroing
* Fix accidental buffer free before transfer
* Refactored code to eliminate a bunch of warnings
* Updated copyright headers
2020-02-20 13:59:28 +01:00
Armin Novak
2acce6214c SCardFreeMemory non const argument. 2020-02-20 13:59:28 +01:00
David Fort
245fc6014d
Merge pull request #5830 from akallabeth/smartcard_updates
Smartcard updates
2020-02-07 14:11:00 +01:00
Kobi Mizrachi
8c5d96784d cmdline: export CommandLineParseCommaSeparatedValues 2020-01-22 14:18:21 +01:00
Kobi Mizrachi
1543664343 winpr: collections: add ArrayList_ForEach 2020-01-14 07:58:47 +01:00
Armin Novak
4798af5132 Fix smartcard structs, conform to [MS-RDPESC] 2020-01-13 10:49:22 +01:00
Armin Novak
a392b266c0 Added NtStatus2Tag function to stringify NTSTATUS
For higher level applications it is easier to translate known
strings instead of error codes. this function allows
to retrieve known string identifiers that can be translated.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 16:14:44 +01:00
Armin Novak
3143570f54 Added missing Stream_Write_INT32 2019-12-04 13:44:08 +01:00
Martin Fleisz
71feb974ac
Merge pull request #5739 from akallabeth/improve_function_hiding
Improve function hiding
2019-12-02 11:31:35 +01:00
Armin Novak
7c243da6e1 Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
David Fort
5e6775ce95 winpr: fix anonymous enum members and menbers without a size 2019-11-25 13:39:31 +01:00
Armin Novak
53f7d023b1 Fixed GetEnvironmentStrings test
Some os return an invalid/wrong character count if a string with
unknown symbols is printed to stdout.
Instead use the sprintf family and print to a buffer / determine
the required buffer size.
2019-11-21 15:05:57 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
700470876b Cleaned up ini.h and added error checks. 2019-10-29 11:54:55 +01:00
kubistika
b3f78d2f4d winpr: utils: image: fix const correctness 2019-10-24 12:19:31 +02:00
Martin Fleisz
583045e2e5 rail: Update to latest spec version 28.0 2019-10-02 14:51:45 +02:00
Martin Fleisz
a907f003e1
Merge pull request #5596 from akallabeth/wlog_cache_ptr
Speedup for WLog_* macros, cache the log pointer
2019-10-01 15:57:17 +02:00
Armin Novak
b1d0eaff6d Fix #5603: Prefer absolute path for /drive: syntax. 2019-09-24 16:42:27 +02:00
Armin Novak
d46a3cb11d Speedup for WLog_* macros, cache the log pointer
WLog_Get(tag) is quite expensive if called repeatedly.
With this patch the pointer is cached on first call.
2019-09-15 10:04:36 +02:00
Armin Novak
f39ec50101 Converted BitStream_* defines to inline functions 2019-09-03 08:55:59 +02:00
Armin Novak
d99486096b Added deprecation macro. 2019-09-02 15:13:09 +02:00
Armin Novak
2cc714a57d Updated RAILS implementation
* Implement new messages and callbacks
* Announce most recent channel features
* Added settings to configure flags to announce
2019-05-08 17:25:15 +02:00
Martin Fleisz
3e2be308eb
Merge pull request #5266 from akallabeth/file_list_synth
Added a proper synthesizer for FileGroupDescriptorW to text/uri-list
2019-05-08 15:05:05 +02:00
Armin Novak
ebb93a1273 Improved implementation of LoadLibrary functions. 2019-04-05 09:14:35 +02:00
Armin Novak
7b246121b4 Improved mutex and event functions
* Added name for debugging to handle.
* Implemented *Ex functions
2019-04-05 09:14:35 +02:00
Armin Novak
7dfc453858 Cast SEC_* return values to HRESULT (Same as WIN32 API) 2019-04-05 09:13:24 +02:00
Armin Novak
9757d536c3 Case SCARD_* return values to HRESULT (Same as WIN32 API) 2019-04-05 09:13:24 +02:00
Armin Novak
25751517e5 Cast E_* errors to HRESULT (same as defined in WIN32 API) 2019-04-05 09:13:24 +02:00
David Fort
37358e81d0
Merge pull request #5285 from akallabeth/urbdrc_preparations
Channel, log debug and semaphore related fixes
2019-04-04 18:21:47 +02:00
Armin Novak
e5fbff357e Fixed Stream_* macros, bracing arguments. 2019-03-07 09:29:32 +01:00
MartinHaimberger
46b1e88a70
Merge pull request #5027 from akallabeth/wlog_off_fix
Fix #5024: Update inherited log level for all child loggers when setting a new one.
2019-02-28 10:55:12 +01:00
Armin Novak
32aa11251b Added a logger dump function operating on a preallocated logger. 2019-02-26 15:31:47 +01:00
Armin Novak
32ea44c037 Added a proper synthesizer for FileGroupDescriptorW to text/uri-list
The file clipboard delegate needs a base URI to operate on for
systems that are not WIN32. Added that to the context and abort
conversion, if that is not set. (currently not fully implemented)
2019-02-21 16:44:40 +01:00
Martin Fleisz
3169b77d70
Merge pull request #5230 from akallabeth/sign_compare_fixes
Sign compare fixes
2019-02-08 09:35:50 +01:00
Martin Fleisz
6415cfec48
Merge pull request #5131 from akallabeth/cmd_line_error_logging
Added extended error logging for assistance, rdp file and command line parser
2019-02-08 09:11:35 +01:00
Armin Novak
3679eefbd4 Fixed BipBuffer Read/Write, limit to SSIZE_MAX. 2019-01-30 18:05:49 +01:00
Armin Novak
650f63c7ca Added missing SSIZE_MAX define 2019-01-30 18:05:49 +01:00
Armin Novak
585391dfbf Fixed sign-compare warning 2019-01-30 18:05:49 +01:00
Armin Novak
fc9e88d64f Added flag to silence command line parser logging during detection. 2019-01-16 14:32:19 +01:00
Peter Åstrand (astrand)
30cd1ba1ab Use lowercase for includes and libs
Makes build possible on case sensitive systems such as MinGW on Linux.
2019-01-09 09:36:28 +01:00
Armin Novak
5dea64a468 Added backtrace function working on allocated logger. 2018-12-17 09:24:57 +01:00
Armin Novak
66e71ef963 Added missing define for _wcsnlen for windows. 2018-12-10 14:02:57 +01:00
Armin Novak
1e644fc37e Added _wcsnlen function for WCHAR string length. 2018-12-10 12:39:32 +01:00
Armin Novak
617c00c8f5 WLog_IsLevelActive is now a exported function istead of inline.
Since this function calls WLog_GetLogLevel anyway better only
export the API to allow internal checks to be modified in the
future without breaking API
2018-11-22 16:34:38 +01:00
Armin Novak
37a01a19d8 Fix #5024: Update inherited log level for all child loggers when setting a new one. 2018-11-19 12:19:12 +01:00