Commit Graph

3437 Commits

Author SHA1 Message Date
akallabeth
8470b6ea26 [cmake] set default build type
set with CACHE STRING FORCE to properly be picked up by configuration
tools
2023-08-04 12:59:11 +02:00
akallabeth
76d23885d4 [cmake] add common options to subprojects 2023-08-04 12:59:11 +02:00
David VERON
fb406feb33 libwinpr/crt/unicode: unicode conversion functions with allocation
Unicode conversion functions with allocation returned NULL when the input was
a string of len = 0. Now those functions allocate buffers with the
corresponding empty string that the caller has to free.
2023-08-03 17:23:52 +02:00
Richard Markiewicz
cd06e7179a [winpr,crypto] Fix compilation with mbedTLS 2023-08-02 10:11:35 +02:00
David Fort
a16c4efb98 mingw: fix build under Ubuntu 22.04 2023-08-02 09:37:32 +02:00
Armin Novak
b97a5448d2 update timezones 2023-08-01 17:18:22 +02:00
akallabeth
eb67f41a50 [cmake] use find_library for windows libs 2023-08-01 13:32:35 +02:00
akallabeth
2b84309b10 [mingw] fix build issues on debian 12 2023-08-01 13:32:35 +02:00
Kai Pastor
5ecc011c13 Export interface include directories 2023-08-01 11:12:46 +02:00
Armin Novak
6bdd36c83d [winpr,test] fix testsynchmultiplethreads 2023-08-01 07:44:48 +02:00
Armin Novak
ef5c0e78ab [build] use define WINPR_FALLTHROUGH
with c17 compatible compilers annotate with [[fallthrough]]
2023-07-31 23:46:53 +02:00
Armin Novak
bd79d8f100 [winpr,rdtk] use png only if supported by winpr
rdtk compiles in bitmaps of fonts. if png format is supported by winpr,
prefer the png images, otherwise use bmp
2023-07-31 20:18:48 +02:00
Armin Novak
97cb8d9e57 [winpr,collections] simplify c++ casts 2023-07-31 10:12:23 +02:00
Armin Novak
35915d3e22 [winpr] fix various warnings 2023-07-31 08:32:43 +02:00
Armin Novak
d4b9812db2 [winpr,sync] define symbols unsigned long 2023-07-31 08:32:43 +02:00
Armin Novak
c9852a870b [winpr] use C++ compatible casts
use a macro for casts to avoid C++ warnings
2023-07-31 08:32:43 +02:00
Armin Novak
6683fb1b22 [winpr,nt] use C++ compatible cast 2023-07-31 08:32:43 +02:00
Armin Novak
2378551105 [winpr,stream] c++ compatible casts
use a macro to cast C or C++ compatible to avoid warnings
2023-07-31 08:32:43 +02:00
ehdgks0627
d04ba8d6ef Correct typos and formatting errors in format strings
In several files, fixed typos in format strings that were causing unexpected output and formatting issues.
2023-07-28 15:34:46 +02:00
Armin Novak
b46a4ce750 [winpr,string] remove duplicate string functions
prefer standard C functions over window specific ones
2023-07-28 13:42:12 +02:00
Armin Novak
4f7a3762ae [winpr] fix cast warnings 2023-07-28 13:42:12 +02:00
Armin Novak
61625f1a2a [winpr,utils] fix cast warnings 2023-07-28 13:42:12 +02:00
Armin Novak
f2aa469700 [winpr,collections] fix cast warnings 2023-07-28 13:42:12 +02:00
Armin Novak
20653aee1d [winpr,ini] fix cast warnings 2023-07-28 13:42:12 +02:00
Armin Novak
32b9eeb3c0 [winpr,sysinfo] deprecage GetVersionInfoEx
the function is deprecated under windows, so deprecate it in WinPR too
and remove/replace usage
2023-07-28 13:42:12 +02:00
Armin Novak
96112b28ab [winpr,stream] replace defines with inline functions 2023-07-28 13:13:50 +02:00
Armin Novak
33653756f2 [winpr,sspi] fixed const correctness of arguments 2023-07-27 21:05:43 +02:00
Armin Novak
e61880d077 [standard] replace __FUNCTION__ with __func__ 2023-07-27 20:02:43 +02:00
Armin Novak
605b6b6233 [cmake] build using external lodepng 2023-07-26 20:19:46 +02:00
Armin Novak
70ddb6518a [PathCchAppend] fix missing return checks 2023-07-26 10:57:42 +02:00
Armin Novak
3847035b8e [winpr,clipboard] fix clipboard file listing 2023-07-26 10:57:42 +02:00
Armin Novak
14d5cbeacb [winpr,file] fix issues with FindFirstFile 2023-07-26 10:57:42 +02:00
Armin Novak
d660f017b2 [winpr,path] add recursive directory delete 2023-07-26 10:57:42 +02:00
Armin Novak
62b6c98393 [winpr,file] do not assume order for directory listings 2023-07-24 11:05:13 +02:00
akallabeth
5de7887d93 start new development cycle after 3.0.0-beta1 release 2023-07-21 16:04:49 +02:00
Armin Novak
f08d59ca5f update version to 3.0.0-beta1 2023-07-21 16:04:35 +02:00
akallabeth
ee078cdda4 [warnings] fix format string warnings 2023-07-20 14:20:28 +02:00
Armin Novak
c26f356225 [winpr,ncrypt] do not link pkcs11 for dynamic detection 2023-07-17 14:04:03 +02:00
akallabeth
2521d151e5 [winpr,wlog] added %{ %} formatter
* New formatter %{xxx%} which conditionally prints xxx if the context is
  not NULL
2023-07-06 15:51:56 +02:00
akallabeth
1f3f3682cc [build] fix conversion warnings 2023-07-05 08:46:00 +02:00
akallabeth
c7f7f38367 [ci] deactivate proxy modules on windows
current builder is too old for c++11
2023-07-05 08:46:00 +02:00
Martin Fleisz
622a2a8df0 misc: More int to BOOL conversion fixes
This is a follow up to #9129.

This PR fixes some problematic `int` to `BOOL` conversions that might
cause overflows when checking for bit flags.
2023-07-04 09:45:20 +02:00
akallabeth
b7ff113780 [winpr,crt] fix missing include 2023-06-29 18:34:51 +02:00
Armin Novak
40ecb1df25 [winpr,ini] documentation and parameter to size_t
* document the IniFile_* fucntions
* Use size_t for size parameters
2023-06-29 14:46:41 +02:00
Armin Novak
21ea8556ce [winpr,ini] remove FILE* from struct
When reading files the FILE* is closed immediately, so this was just
confusing
2023-06-29 14:46:41 +02:00
Armin Novak
58087e544f [winpr,ini] unify buffer allocation 2023-06-29 14:46:41 +02:00
Armin Novak
37e5e2223e [winpr,ini] unify filename setting 2023-06-29 14:46:41 +02:00
Armin Novak
eb6230a563 [winpr,ini] assert arguments 2023-06-29 14:46:41 +02:00
Armin Novak
c717380020 [winpr,ini] unify reallocation of ini sections and keys 2023-06-29 14:46:41 +02:00
akallabeth
0d3b2dd3c3 [tests] fixed format strings 2023-06-29 14:30:09 +02:00
akallabeth
d0456914e5 [winpr,wlog] extend wLog to allow logging custom data
A logger allocated with WLog_Get now can have a customized context by
setting it with WLog_SetContext. Along with the newly introduced format
specifier %ctx an additional field is printed for the context.
2023-06-29 14:30:09 +02:00
Armin Novak
646a78d19c [cmake] do proper pkcs11 detection
do not rely on find_feature but use a CMake option and find_package
2023-06-28 10:02:15 +02:00
akallabeth
3f78b3c379 [build] fix unused compiler warnings 2023-06-28 09:45:09 +02:00
akallabeth
3554dd1c64 [winpr,crypto] use void* for buffer arguments 2023-06-28 09:45:09 +02:00
akallabeth
0c15f72169 [winpr,collections] fixes for ListDictionary
* Make ListDictionary_Add and ListDictionary_SetItemValue arguments
  const
* Allow ListDictionary_Add to store NULL values
2023-06-28 08:19:20 +02:00
Armin Novak
b8a0091c92 [winpr,utils] add IniFile_Clone 2023-06-27 17:36:57 +02:00
akallabeth
df3f274dd0 [test,listdictionary] fix format string 2023-06-27 15:05:43 +02:00
akallabeth
51ed074d1d [winpr,collections] add doxygen for some types
* wLinkedList
* wObject
* wQueue
* wListDictionary
2023-06-27 15:05:43 +02:00
akallabeth
e1ae901858 [winpr,collections] fix ListDictionary_Add
create copies of key and value if the function pointer are set
2023-06-27 15:05:43 +02:00
akallabeth
54847499e9 [winpr,collections] fix ListDictionary New/Free handling 2023-06-27 15:05:43 +02:00
akallabeth
f27076ab82 [winpr,collections] ListDictionary 2023-06-27 15:05:43 +02:00
akallabeth
0669cfe483 [winpr,collections] CountdownEvent 2023-06-27 15:05:43 +02:00
akallabeth
1fd0e15810 [winpr,collections] remove unused ReferenceTable 2023-06-27 15:05:43 +02:00
akallabeth
8e319c4fa7 [winpr,collections] LinkedList_Count 2023-06-27 15:05:43 +02:00
akallabeth
63d4da2d0d [winpr,collections] ListDictionary_GetKeys 2023-06-27 15:05:43 +02:00
akallabeth
ac39e8aac2 [winpr,collections] ListDictionary_Count 2023-06-27 15:05:43 +02:00
Hugues LEFEBVRE
b67afecf0f CredSSP with early user auth (nla_ext) support 2023-06-26 11:53:46 +02:00
akallabeth
64486828bb [winpr,crt] fix winpr_aligned_offset_recalloc
the copied data was taken from the wrong offset
2023-06-12 16:32:23 +02:00
akallabeth
a64dd36073 [build] fixed const warnings 2023-06-12 16:32:23 +02:00
Armin Novak
979610b1fd [winpr,stream] assert valid pointer 2023-06-08 08:13:16 +02:00
Armin Novak
970f0c54e8 [stream] use const correct Stream_Pointer access 2023-06-08 08:09:33 +02:00
Armin Novak
2de7399e52 [winpr,stream] change Stream_Pointer return to void*
Eliminates possible type warnings as we return a void*
If a specific type is desired, use the Stream_PointerAs macro.
2023-06-08 08:09:33 +02:00
Armin Novak
81e95e51ca [winpr,ncrypt] log problems during cert enumeration 2023-06-07 23:05:54 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
akallabeth
734ae69756 [winpr] fix some msan warnings
initialize local stack variables
2023-06-07 09:14:45 +02:00
Armin Novak
ba98aa0a8c [winpr] add atexit calls for WLog and SSL providers
C11 atexit cleanup handler are used to call cleanup routines for WLog
and SSL on program termination. This removes false positives when using
ASAN runtime memory debugger
2023-05-30 15:42:39 +02:00
akallabeth
4efc4e769e [warnings] fix -Wunused-label 2023-05-24 08:24:32 +02:00
akallabeth
df76b59da7 [warnings] fix -Wshadow 2023-05-24 08:24:32 +02:00
akallabeth
ab677f8abe [warnings] fix -Wempty-translation-unit 2023-05-24 08:24:32 +02:00
fifthdegree
449b96adb2 Use popup browser for AAD auth in SDL client
Optionally build the SDL client with Qt WebEngine to create a popup
browser for authentication to AAD. Also change the URL output on the
command line to use the "nativeclient" redirect for easier copy/pasting
of the authorization code.
2023-05-23 06:04:55 +02:00
fifthdegree
ba7fdcb5f0 Move alloc_sprintf into the winpr string api 2023-05-23 06:04:55 +02:00
Armin Novak
05669eff31 [winpr,pool] WINPR_ASSERT thread pool function arguments 2023-05-22 11:51:12 +02:00
Armin Novak
0c7330720f [winpr,crypto] add internal rc4 replacement
RDP relies on RC4 for some operations, so we need these to successfully
log on to windows machines. This is a replacement for use with SSL
libraries that have already deprecated these.
2023-05-17 14:51:58 +02:00
Armin Novak
06bd759c64 [winpr,crypto] use a struct for RC4 context 2023-05-17 14:51:58 +02:00
akallabeth
2d248d1c96 [winpr,sspi] verbosly check NTLM context 2023-05-17 14:51:58 +02:00
akallabeth
93c5058aa5 [winpr,crypto] rc4 allocation check
* check success of winpr_RC4_New
* WINPR_ASSERT context when used
2023-05-17 14:51:58 +02:00
Armin Novak
10f8a7b4e4 [winpr,print] use void* as arguments for dump functions
to avoid casting or type mismatch warnings use void* as pointer to data
for dump functions
2023-05-17 14:19:31 +02:00
akallabeth
4a006322af [winpr,clipboard] fix url unescape for file uri 2023-05-12 13:57:56 +02:00
akallabeth
d2cf953f24 [winpr,input] properly define keyboard types
* use an enum to define the different WINPR_KEYBOARD_TYPE*
* use the enum as argument for the functions instead of DWORD
2023-05-12 09:52:01 +02:00
David Fort
46171045ed [winpr,input] fix GetKeycodeFromVirtualKeyCode(code, KEYCODE_TYPE_XKB)
As KEYCODE_TYPE_XKB is 3, in the previous code we were doing some "and masking"
and so when calling GetKeycodeFromVirtualKeyCode(code, KEYCODE_TYPE_XKB), the
function was always interpreting the virtual key code with the apple layout.
This patch fixes that and also mutualize the search in the code array.
2023-05-12 09:52:01 +02:00
akallabeth
564da71f11 [winpr,crypto] add digest sign functions 2023-05-10 09:59:10 +02:00
Alexandru Bagu
a231c09fff fixes for llvm-mingw build 2023-05-04 12:56:16 +02:00
Martin Fleisz
3cb55a87e3 winpr: Add support for AVX2/AVX512F feature detection 2023-05-02 12:06:47 +02:00
akallabeth
05edcbc357 [cmake] fix version from git tag
only consider tags that conform to the format  'somestring1.2.3' as
valid tags
2023-05-02 09:34:07 +02:00
akallabeth
be74ce00a7 [winpr,tools] add openssl3 support 2023-04-28 08:33:06 +02:00
Armin Novak
f8ac8f1773 [winpr,schannel] add compile option WITH_DEBUG_SCHANNEL 2023-04-28 08:33:06 +02:00
Armin Novak
55a8695cfe [winpr,crypto] add openssl 3 support
update hashing functions for openssl 3
2023-04-28 08:33:06 +02:00
akallabeth
516668d02b [fclose] ensure no invalid pointers are passed.
fclose has undefined behaviour for NULL pointers, so check for these.
2023-04-28 07:39:35 +02:00
akallabeth
09aa4e63a9 [winpr,utils] fix COMMAND_LINE_VALUE_PRESENT
the flag was set unconditionally, only set it if there actually is a
value present
2023-04-28 07:39:35 +02:00
fifthdegree
6abd9165e6 Only accept hostname for kdc-url
For compatibility with windows
2023-04-27 16:31:30 +02:00