akallabeth
2170cc65e3
[warnings] cast return of fprintf (void)
...
fprintf returns a value. Not using it is mostly fine, but it generates
noise when compiling with all warnings on, so cast to (void)
2024-09-06 09:16:21 +02:00
akallabeth
889ae65a1f
[warnings] add WINPR_CAST_CONST_PTR_AWAY
...
simple macro casting a const pointer to a non const one.
2024-09-04 20:55:17 +02:00
akallabeth
5887f8a558
[warnings] suppress warnings
...
Some warnings can not be solved as they depend on external libraries or
limitations of the C standard.
Suppress these warnings selectively
2024-08-30 15:40:16 +02:00
akallabeth
6a3564407e
[warnings] fix clang-tidy issues in winpr
2024-08-29 15:20:39 +02:00
akallabeth
9c9d74e920
[warnings] fix redundant casts
2024-08-29 12:03:09 +02:00
akallabeth
1d33095500
[warnings] fix cert-err33-c
...
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
Armin Novak
d71af44bb1
[warnings] disable warnings for generated code
...
* Disable clang-tidy in test build directories
* Disable compiler warnings for test binary directories.
These contain generated code we can not change, so the warnings are just noise
2024-08-28 09:18:30 +02:00
akallabeth
97d7a3fc6d
[winpr,crypto] OpenSSL3 md5 support
...
Just like https://github.com/MariaDB/server/pull/2010 add support for
OpenSSL3 MD5 in FIPS mode.
2024-06-04 10:27:27 +02:00
akallabeth
d7ebec5a65
[tidy] move loop variable declaration to loop
2024-02-22 12:31:50 +01:00
akallabeth
f69e1fe697
[clang-tidy] readability-duplicate-include
2024-02-15 11:49:16 +01:00
akallabeth
0ba995655d
[clang-tidy] cppcoreguidelines-init-variables
2024-02-15 11:49:16 +01:00
akallabeth
207def5c56
[clang-tidy] readability-isolate-declaration
2024-02-15 11:49:16 +01:00
akallabeth
28a2bf0848
[winpr,crypto] simplify winpr_Digest_Init_Allow_FIPS
2024-02-13 19:54:25 +01:00
akallabeth
fe37bc80d4
[winpr,crypto] fix WITH_INTERNAL_MD5 handling
...
If WITH_INTERNAL_MD5=ON also use it with winpr_Digest_Init_Allow_FIPS
2024-02-13 17:27:03 +01:00
akallabeth
0d68cb4f42
[build,attr] fix WINPR_ATTR_MALLOC
...
* do not use this attribute if the free function takes pointer to pointer
* audio_format_new must be freed by audio_formats_free
2024-02-12 10:23:27 +01:00
akallabeth
ba8cf8cf21
[build] fix Wmismatched-deallocator warnings
...
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
akallabeth
bb42d425ed
[gcc,clang] add support for attribute(malloc)
...
Mark all malloc like functions and add their appropriate free function
to let the compiler complain on mismatches
2024-02-02 15:10:40 +01:00
Marc-André Moreau
6fbd447342
migrate to mbedtls 3.x with mbedtls 2.x backward compatibility
2023-12-19 11:34:24 +01:00
Vic Lee
97ef5d09e9
[core,crypto] fix missing OpenSSL includes.
2023-12-11 08:51:59 +01:00
akallabeth
1b31852d32
[git] remove .gitignore
...
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
David Fort
2252d53001
[winpr] cipher enable setting the padding option
...
It happens that with some ciphers the standard behaviour that disables padding
is not desired. This patch adds a function to enable padding.
2023-08-16 10:19:15 +02:00
Richard Markiewicz
cd06e7179a
[winpr,crypto] Fix compilation with mbedTLS
2023-08-02 10:11:35 +02:00
Armin Novak
e61880d077
[standard] replace __FUNCTION__ with __func__
2023-07-27 20:02:43 +02:00
akallabeth
3554dd1c64
[winpr,crypto] use void* for buffer arguments
2023-06-28 09:45:09 +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
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
akallabeth
564da71f11
[winpr,crypto] add digest sign functions
2023-05-10 09:59:10 +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
Armin Novak
3d8cb485f4
[warnings] Fixed strict-prototypes warnings
2023-03-06 10:04:59 +01:00
Armin Novak
a726fa613a
[winpr] improve digest failure logging
2023-03-05 17:03:18 +01:00
akallabeth
2f05166fb1
[winpr,crypto] improve logging
2023-02-03 11:09:59 +01:00
akallabeth
389817cb57
[winpr,crypto] fixed const correctness of md4/5
2022-12-09 15:58:26 +01:00
akallabeth
5799fb2018
Replace ConvertFromUnicode and ConvertToUnicode
...
* Use new ConvertUtf8ToWChar, ConvertUtf8NToWChar,
ConvertUtf8ToWCharAlloc and ConvertUtf8NToWCharAlloc
* Use new ConvertWCharToUtf8, ConvertWCharNToUtf8,
ConvertWCharToUtf8Alloc and ConvertWCharNToUtf8Alloc
* Use new Stream UTF16 to/from UTF8 read/write functions
* Use new settings UTF16 to/from UTF8 read/write functions
2022-11-28 10:42:36 +01:00
Armin Novak
7b95014157
[winpr,crypto] Split crypto header renamed
...
* Renamed custom winpr crypto function header
* Added compatiblity header
2022-11-23 09:39:56 +01:00
Armin Novak
d03f230426
[winpr,crypto] Split headers
...
Split windows API emulation from custom functions
Including both might yield issues with OpenSSL headers
2022-11-21 13:27:08 +01:00
Armin Novak
a40ade5abc
Fixed -Wincompatible-pointer-types
2022-11-21 10:12:31 +01:00
Armin Novak
bc7c4cc6a1
Fixde -Wimplicit-function-declaration
2022-11-21 10:12:31 +01:00
Armin Novak
4ea4f5e936
Fixed compile error for old openssl
2022-10-27 10:03:32 +02:00
fifthdegree
78ba60f50f
Check for NULL pointer in winpr_Digest_Free
2022-10-24 08:33:57 +02:00
akallabeth
68ad8d5a1c
Added missing return in winpr_Digest_New
2022-10-20 19:24:41 +02:00
akallabeth
eb77fd7b0d
Added replacement HMAC-MD5 implementation
2022-10-19 08:17:11 +02:00
akallabeth
3a5fb5e3a3
Added replacement MD5 implementation
2022-10-19 08:17:11 +02:00
akallabeth
309a6bea77
Added replacement MD4 implementation
2022-10-19 08:17:11 +02:00
akallabeth
1e1b3b6c3c
Updated TestCryptoHash
...
Do multiple updates to hashes to better test implementation
2022-10-19 08:17:11 +02:00
akallabeth
43c5289928
Replaced memset/ZeroMemory with initializer
...
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
Adrian Perez de Castro
81e8e28062
Fix building with LibreSSL 2.7.0 or newer
...
With LibreSSL 2.7.0 (or newer versions) some more structs have made
opaque, which requires a few changes:
- BIO_meth_new() and related functions are now defined by LibreSSL, the
versions from opensslcompat.{h,c} does not need to be used anymore.
- HMAC_CTX is now opaque, HMAC_CTX_new(), EVP_MD_CTX_new, and related
functions should be used instead in winpr's hash.c.
2022-06-27 12:42:06 +02:00
akallabeth
bc8b4ade1c
reformatted
2022-06-23 08:48:39 +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
Armin Novak
6ed50b4b1d
Refactored WinPR includes
2022-03-03 11:26:48 +01:00