Commit Graph

26 Commits

Author SHA1 Message Date
akallabeth
503b9f0bb7
[warnings] fix integer narrowing 2024-10-03 21:21:45 +02:00
akallabeth
08afc250a3
[warnings] fix integer narrowing 2024-10-03 21:21:36 +02:00
akallabeth
7d2afe4f5a
[crypto,base64] fix sign warnings 2024-07-22 15:08:51 +02:00
akallabeth
45a7e5fd37
[crypto,base64] fix compiler warning 2024-07-22 15:08:43 +02:00
akallabeth
d9473be307
[crypto,base64] force signed char
for lookup force signed char to avoid (unsigned)-1 casts
2024-06-17 17:02:41 +02:00
akallabeth
87ee8f5b77
[crypto,base64] use lookup tables 2024-06-08 08:34:02 +02:00
akallabeth
a93658cd06
[crypto,base64] apply INLINE and WINPR_RESTRICT 2024-06-07 12:32:16 +02:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +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
David Fort
8a39859612 [arm] various improvements
This patch moves the ARM configuration before starting the connection process, so
that we can do some provisioning of the FreeRDP settings with the items retrieved
from Azure.
Most notably that allows us to connect directly using RDSTLS security.
2023-09-04 10:24:56 +02:00
David Fort
361da15eed [crypto] extend base64 to output crLf when encoding
Some windows APIs do put \r\n every 64 characters of the output of a
base64 encoded blob. The extended version of crypto_base64_encode allows
to do the same.
2023-09-04 10:24:56 +02:00
fifthdegree
304ce6d702 Test base64url en/decoding
Add tests for base64url and fix a bug discovered while doing that
2023-03-10 16:38:07 +01:00
fifthdegree
8d6c92c037 Implement base64url encoding/decoding
Tweak the base64 functions to allow for encoding and decoding base64url
as well
2023-03-10 16:38:07 +01:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak
f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
akallabeth
b494a193db Refactored certificate API:
* Proper encapsulation
* known_hosts2 backend extended (storing PEM)
* New backend storing each host certificate in a file
2021-05-11 08:00:18 +02:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
dfa7ac6434 Ensure output of crypto_base64_decode is NULL terminated. 2015-08-27 09:34:33 +02:00
David FORT
7c3f8f33ab Fixes for malloc / calloc + other fixes
This patch contains:

* checks for malloc return value + treat callers;
* modified malloc() + ZeroMemory() to calloc();
* misc fixes of micro errors seen during the code audit:
** some invalid checks in gcc.c, also there were some possible
integer overflow. This is interesting because at the end the data are parsed
and freed directly, so it's a vulnerability in some kind of dead code (at least
useless);
** fixed usage of GetComputerNameExA with just one call, when 2 were used
in misc places. According to MSDN GetComputerNameA() is supposed to return
an error when called with NULL;
** there were a bug in the command line parsing of shadow;
** in freerdp_dynamic_channel_collection_add() the size of array was multiplied
by 4 instead of 2 on resize
2015-06-22 19:21:47 +02:00
Hardening
9f1d0201ec Changes for base64
This patch changes the prototype for decode_base64 so that the encode / decode
method are consistant (encode(BYTE *) => char* and decode(char*) => BYTE*).
It also does some improvements with unrolling loops so that end conditions are
tested only at the end.
The patch also adds some unitary tests.
Before the patch base64_decode() made valgrind complain about uninitialized
bits, after valgrind is happy and very quiet.
2014-05-11 22:49:10 +02:00
Hardening
50f1f0df6f Add some const modifiers
This allows these functions to be used with const buffers.
2014-05-09 22:36:50 +02:00
Armin Novak
0575197960 Fixed coverity issue 1047609 2013-09-05 12:14:32 +02:00
Marc-André Moreau
db331d64f7 libfreerdp-core: fix message queue ids, fix async glyph messages 2013-02-03 12:41:59 -05:00
Marc-André Moreau
44bb1059ea libfreerdp-crypto: replace Base64 implementation 2013-01-31 18:07:04 -05:00