Commit Graph

41 Commits

Author SHA1 Message Date
akallabeth
71e78bedd7 [warnings] fixed sign and const
* fix various char/BYTE sign warnings
* fix various const warnings
* fix format string size_t
* remove unused CMake variables
2024-04-18 11:05:58 +02:00
akallabeth
501b86baf4 [coverity] 1543153 Resource leak 2024-04-12 09:45:09 +02:00
Armin Novak
8b2e13d989 [emu,scard] abort busy loop on session cancel 2024-04-05 13:06:57 +02:00
amazingfate
e21afefb86 fix build with openssl < 1.1.1 2024-02-23 12:45:36 +01:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
b894199f72 [winpr,collections] add generic string clone functions
The ArrayList, HashTable, ... New functions require
void* (*fkt)(const void* ptr) type functions. Provide a generic wrapper
for CHAR and WCHAR strdup to eliminate warnings. Also export a
corresponding free function to avoid issues with runtime
differences.
2024-02-15 11:49:16 +01:00
akallabeth
0e44b2c674 [clang-tidy] clang-analyzer-unix.Malloc 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
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
Armin Novak
9575f386cd fixed WCHAR constants, use endian safe definitions 2023-12-20 09:03:58 +01:00
Armin Novak
1048ad4003 [scard] allow INFINITE timeout 2023-11-21 15:54:01 +01:00
akallabeth
5a7a1c159d [casts] remove fnObject* function pointer casts
use proper types that match the function pointer definition to avoid
surprises if the code should be refactored
2023-09-20 21:11:30 +02:00
akallabeth
d350b89fe3 [emu,scard] fix return type 2023-08-25 14:36:05 +02:00
akallabeth
1fc0d5b4b1 [winpr] remove casts for winpr_RAND calls 2023-06-21 09:57:52 +02:00
akallabeth
148063e638 [emu,scard] silence sign warnings 2023-05-16 09:33:35 +02:00
akallabeth
60f36ed2d6 [emu,scard] use EVP_PKEY_decrypt to determine length 2023-04-28 08:33:06 +02:00
Armin Novak
8b6d05f90f [crypto] fix key decrypt inconsistencies 2023-04-28 08:33:06 +02:00
akallabeth
402cffdeb2 [emu,scard] openssl 3 support 2023-04-28 08:33:06 +02:00
akallabeth
6c38e20e4e [crypto,cert] add openssl3 support 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
a7dac52a42 [license] updated copyright headers 2023-02-12 20:17:11 +01:00
Armin Novak
13d96cca9f [emu,scard] fix key sizes 2023-02-12 20:17:11 +01:00
Armin Novak
b77be1ad61 [emu,scard] use RSA struct instead of rdpCertInfo
rdpCertInfo has the RSA key in RDP specific format. Prefer direct
extraction from certificate or key
2023-02-12 20:17:11 +01:00
Armin Novak
0cb3afd4bc [emu,scard] check for valid RSA 2023-02-12 20:17:11 +01:00
akallabeth
af371bef6a [crypto] rename rdpRsaKey to rdpPrivateKey 2023-02-12 20:17:11 +01:00
akallabeth
67bd1d08d3 [emu,scard] use rdpCertificate and rdpRsaKey 2023-02-12 20:17:11 +01:00
Armin Novak
19f44a5734 Decreased logging verbosity for smartcard emulation 2022-10-13 13:57:11 +02:00
Martin Fleisz
372153bba3 gids: Fix broken check in GIDS emulation 2022-05-13 12:55:37 +02:00
akallabeth
8f109ec89a Make ATR variable static 2022-04-28 13:25:27 +02:00
akallabeth
340f9dd775 Fixed conditional warnings 2022-04-28 12:37:19 +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
akallabeth
704289ffee
Smartcard tls logon fix (#7709)
* Early return authenticate if TLS smartcard logon

* Removed obsolete SmartcardPin and unified AuthenticateEx calls

* Remove password-is-pin from command line

The setting is implied by smartcard-logon and only of interest in
server side code, so the setting is useless

* Rework AUTH_SMARTCARD_PIN

Just prompt for PIN and not user/domain if this is requested.

* Fixed a memory leak in nla.c

* Align credentail prompt

* Handle AUTH_NLA & smartcard, just ask for PIN

* Added assertions, removed duplicate password prompt check

* Move smartcard logon after credential prompt
2022-03-09 09:09:53 +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
David Fort
62ac25ef54 smartcard_emu: enable to specify the smartcard pin 2022-02-24 08:52:25 +01: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
akallabeth
a337031b24
Cache Emulate_IsConfigured result (#7569)
* Cache Emulate_IsConfigured result

The check is used very often, so this caching reduces necessary
allocations.

* Fix winpr_HexLogDump

Abort function early if the log message is to be discarded due to
the log level being inactive.

* Use common logger for rdpdr message

Co-authored-by: Martin Fleisz <martin.fleisz@thincast.com>
2022-01-21 13:24:20 +01:00
David Fort
990b3cf7bb
smartcard_emulate: change the announced ATR (#7564)
This other ATR seems to be more recognized by new windows versions.
2022-01-19 12:00:53 +01:00
Armin Novak
9bd519d892 Do not reset scard context cancel 2022-01-18 09:02:07 +01:00
akallabeth
8c543b1de2 Added smartcard emulation layer 2022-01-11 12:34:43 +01:00