Commit Graph

671 Commits

Author SHA1 Message Date
Armin Novak
486caf5516 [winpr] fix InitializeCriticalSectionAndSpinCount
Check return values when used.
2026-02-27 15:52:34 +01:00
Armin Novak
ea77d2d922 [nodiscard] fix all InitOnceExecuteOnce usages 2026-02-27 15:52:28 +01:00
Armin Novak
5c510af477 [c23,freerdp] replace NULL with nullptr 2026-02-26 15:06:27 +01:00
Armin Novak
699ffa9da1 [crypto,certificate] add sanity checks to certificate_new_x509_certificate_chain
Check provided data and abort early if the values are not matching the
data received.
2026-02-26 13:46:57 +01:00
Armin Novak
e58819830a [c23] simplify boolean checks 2026-02-26 11:51:05 +01:00
Armin Novak
0531803808 [warnings] make function declaration names consistent
Use the same parameter names for declaration and implementation.
2026-02-26 10:35:25 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
akallabeth
8892558b4e Merge pull request #12360 from akallabeth/attr-nodiscard-libfreerdp
[libfreerdp] mark internal functions [[nodiscard]]
2026-02-25 10:13:23 +01:00
Armin Novak
3fcc287b16 [warnings] initialize all va_list 2026-02-25 07:41:39 +01:00
Armin Novak
4e4f84d33d [libfreerdp] mark internal functions [[nodiscard]] 2026-02-24 11:54:00 +01:00
akallabeth
1b744c15fe Merge pull request #12319 from akallabeth/grow-reasonable
[allocations] fix growth of preallocated buffers
2026-02-17 15:23:17 +01:00
Armin Novak
118afc0b95 [allocations] fix growth of preallocated buffers
* Replace * 2 with * sizeof(WCHAR) for string usages
* Grow streams and other buffers reasonably, e.g. add 128 elements per
  try and check for possible overflows
* Add constant postfix to force them to 64bit
2026-02-17 13:54:34 +01:00
Armin Novak
df64d00a97 [warnings,api] fix -Wunused-result
With marking publid API [[nodiscard]] some problematic error checks in
the core library were uncovered. This commit addresses these
shortcomings.
2026-02-17 11:07:08 +01:00
akallabeth
7990eec166 [freerdp] mark all WINPR_ATTR_MALLOC also nodiscard 2026-01-26 13:39:39 +01:00
Armin Novak
01e1f1b595 [crypto] deprecate er and der modules
These are unused and not well tested, mark them deprecated to announce
removal once FreeRDP 4 is released.
2026-01-21 16:41:25 +01:00
akallabeth
fb8efd45f2 [c,format] fix format string and review warnings 2026-01-16 13:36:14 +01:00
akallabeth
09ad4a70cd [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:11 +01:00
akallabeth
2b577b29f6 [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:08 +01:00
akallabeth
fdcb71a956 [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:06 +01:00
akallabeth
c9ed4b055a [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:03 +01:00
akallabeth
49034a8d28 [c,printf] fix wlog format string to match arguments 2026-01-16 11:42:01 +01:00
akallabeth
974b65c371 [c,printf] fix wlog format string to match arguments 2026-01-16 11:41:58 +01:00
akallabeth
011737296d [crypto,base64] do proper length checks
relying on casting is error prone, so do proper index range checks.
2026-01-10 10:23:12 +01:00
akallabeth
62a9e787ed [crypto,base64] ensure char is singend 2026-01-10 09:02:02 +01:00
akallabeth
cb53de0733 [crypto,tls] fix freerdp_tls_connect_ex return values 2026-01-09 09:24:29 +01:00
Armin Novak
164dfef442 [warnings] fix signed/unsigned compare warnings 2026-01-09 09:24:19 +01:00
Armin Novak
f8ac8fb7b6 [c,warnings] fix unterminated string warnings
initialize variables as array to avoid warnings with gcc >= 15 or clang
2026-01-08 11:32:47 +01:00
Armin Novak
361d0e80f8 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
7ba7501777 [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
8343f0596f [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
2d3cb653ce [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
4a2262d52a [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
Armin Novak
f7478f906c [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:41 +01:00
akallabeth
a0b21f992a Merge pull request #12072 from akallabeth/cert-data-checks
[crypto,certificate_data] add some hostname sanitation
2025-12-14 09:32:24 +01:00
akallabeth
83d96a81f3 [crypto,certificate_data] add some hostname sanitation 2025-12-13 17:29:09 +01:00
akallabeth
b160ea80e8 [mingw] fix type incompatibilities
The integer types with MINGW do not always match. Ensure the correct
32bit interger base type is used when passing pointers
2025-12-12 19:09:30 +01:00
akallabeth
3666b91981 [crypto,certificate] sanitize hostnames
When creating a local certificate file ensure the hostname does not
contain invalid characters.
2025-12-09 08:32:42 +01:00
akallabeth
6c0a302083 [core,gateway] improve arm transport 2025-10-28 11:57:27 +01:00
Richard Markiewicz
5066253685 [crypto,x509] set comparison function for sk_ASN1_OBJECT_find in EKU check 2025-10-28 11:57:25 +01:00
akallabeth
4486b1a492 [crypto,tls] make cert warning more accurate 2025-10-20 18:30:20 +02:00
Olivier Blin
7855417c10 [crypto,x509] add missing OpenSSL include for d2i_RSA_PSS_PARAMS 2025-10-17 14:59:07 +02:00
akallabeth
74648eb3a9 [c,standard] use C99 inline 2025-09-26 11:29:26 +02:00
Armin Novak
6cfdf9e43e [json] use WINPR_JSON_GetObjectItemCaseSensitive
Prefer usage of case sensitive functions that are faster.
2025-09-23 12:38:23 +02:00
Armin Novak
7e6de56338 [core,gateway] automatically accept ARM redirection
When using ARM gateway transport auto accept the certificate provided
by server response.
2025-09-17 15:20:31 +02:00
akallabeth
8b9335aa90 [CMake,libfreerdp] add pkg-config dependencies 2025-09-11 07:17:42 +02:00
akallabeth
aa6062e014 [crypto,tls] fix object size warnings
As sane limit for strings for BIO_puts set INT_MAX. On systems where
SIZE_MAX is smaller, replace it with SIZE_MAX
2025-09-01 09:03:07 +02:00
Armin Novak
124e2adafe [warnings] fix type mismatches 2025-08-18 14:32:29 +02:00
Armin Novak
96bc120213 [crypto,tls] set server certificate chain 2025-08-18 13:39:43 +02:00
Ofir Matasas
5ee98aab3f Add extract_chain_from_pem function for getting cert chain 2025-08-18 13:39:40 +02:00
akallabeth
66ed6d74ac [crypto,tls] do not use context->settings->instance 2025-07-18 13:48:43 +02:00