akallabeth
b0c11ebd91
Fixed smartcard_unpack_reader_state, allow empty names
2021-02-10 10:36:51 +01:00
akallabeth
8217f5a9e3
Fixed SCardTransmit return
2021-02-10 10:36:51 +01:00
akallabeth
f693a60ec2
Unified smartcard call data structs
2021-02-10 10:36:51 +01:00
akallabeth
6cf5ba4736
Unified smartcard handle converstion
2021-02-10 10:36:51 +01:00
akallabeth
09d2806ac6
Fixed various return values in case of result != SCARD_S_SUCCESS
2021-02-10 10:36:51 +01:00
akallabeth
5fc24ef408
Fixed GetAttrib call
2021-02-10 10:36:51 +01:00
akallabeth
2767940891
refactored smartcard allocations
2021-02-10 10:36:51 +01:00
akallabeth
b049265203
Fixed SCard debug WCHAR string lengths
2021-02-10 10:36:51 +01:00
akallabeth
082b4b59d3
Fixed SCardGetAttrib pbAttr=NULL argument
...
If fpbAttrIsNULL!=0 set pbAttr NULL on call to SCardGetAttrib
2021-01-26 13:33:27 +01:00
Martin Fleisz
b092ab3b85
channels/smartcard: Fix race in channel cleanup
2021-01-22 09:49:56 +01:00
akallabeth
6e3c00725a
Cleaned up collections:
...
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
akallabeth
5c0ccb7575
Fixed formatting.
2020-06-04 07:55:12 +02:00
Ondrej Holy
c03f68059d
smartcard: Teoretical fix of uninitialized values
...
This tries to fixes the following defects reported by covscan tool:
- channels/smartcard/client/smartcard_operations.c:958: uninit_use_in_call: Using uninitialized value "ret.cReaders" when calling "smartcard_pack_locate_cards_return".
- channels/smartcard/client/smartcard_operations.c:932: uninit_use_in_call: Using uninitialized value "ret.cReaders" when calling "smartcard_pack_locate_cards_return".
But I am not sure about it...
2020-06-04 07:55:12 +02:00
Ondrej Holy
7554154a04
smartcard: Fix usage of uninitialized values
...
This fixes the following defect reported by covscan tool:
- channels/smartcard/client/smartcard_pack.c:942: uninit_use_in_call: Using uninitialized value "tmp" when calling "ConvertFromUnicode".
- channels/smartcard/client/smartcard_pack.c:894: uninit_use_in_call: Using uninitialized value "tmp" when calling "ConvertFromUnicode".
- channels/smartcard/client/smartcard_pack.c:475: uninit_use_in_call: Using uninitialized value "tmp" when calling "ConvertFromUnicode".
2020-06-04 07:55:12 +02:00
akallabeth
feb7d4f362
Changed smartcard no reader log message level to info
2020-05-08 11:21:51 +02:00
akallabeth
af79aafbba
Fixed int overflow in smartcard_ndr_read
...
Thanks to hac425
2020-05-08 11:04:03 +02:00
Armin Novak
e80316cf9a
Silence SCARD_E_TIMEOUT warnings
...
These occur quite often for status calls, so reduce log verbosity.
2020-05-04 17:32:55 +02:00
Alex Wilson
40f23e2728
SCardReadCache/SCardWriteCache should actually cache data
...
Currently since the hash/keyCompare/keyClone members on the
context->cache were never being set, we were using the
HashTable_Pointer* variants, meaning that lookup always
failed (since we never ask for the same *pointer* twice).
This also revealed that the logic for autoallocate on these ops
was a bit backwards, and some error codes and support for the
"freshness" counter were missing.
In Win10 (at least with some card minidrivers) the freshness
counter is load-bearing and smartcard login won't work without
implementing a very basic version of it.
2020-04-21 08:11:54 +02:00
akallabeth
6b66aa71fb
Fixi #6086 : smartcard filter early abort.
...
Do not abort before incrementing read position.
2020-04-14 19:04:11 +02:00
Alex Wilson
c6e675bfb7
Always copy null terminator when filtering smartcard list
2020-04-09 10:44:25 +02:00
akallabeth
2749de506c
Added missing context and handle read.
2020-03-30 11:07:47 +02:00
Armin Novak
f360d445e2
Pack smartcard channel structs to 1 byte alignment
2020-03-27 18:24:25 +01:00
akallabeth
ac4ec690c9
Removed a few magic numbers.
2020-03-27 15:03:59 +01:00
akallabeth
80177efe69
Fixed typos, make status comparisons explicit.
2020-03-27 14:49:09 +01:00
Armin Novak
2968e41409
Fixed missing boundary checks in smartcard_array_dump
2020-03-02 09:01:39 +01:00
Armin Novak
bef8dda5e1
Fixed data length for list reader group return.
2020-02-20 15:35:11 +01:00
Armin Novak
5ab0716d7b
SCardListReadersW return length is in bytes, not char.
2020-02-20 15:24:03 +01:00
Armin Novak
fd89ff6913
Fixed some conversion warnings.
2020-02-20 14:40:19 +01:00
Armin Novak
9b5f1ab384
Beautify smartcard log.
2020-02-20 13:59:28 +01:00
Armin Novak
893d08d653
Decreased smartcard log verbosity.
2020-02-20 13:59:28 +01:00
Armin Novak
a8e8351c1d
Removed duplicated copyright claim
2020-02-20 13:59:28 +01:00
Armin Novak
f885476423
Fixed 8bit and 16bit return string sizes.
2020-02-20 13:59:28 +01:00
Armin Novak
ef93109f42
Fixes for GetAttrib and some refactroing
...
* Fix accidental buffer free before transfer
* Refactored code to eliminate a bunch of warnings
* Updated copyright headers
2020-02-20 13:59:28 +01:00
Armin Novak
fe61eab88c
Fixed SCardReadCache autoallocate handling.
2020-02-20 13:59:28 +01:00
Armin Novak
04f0e679f7
Fixed NDR pointer handling for smartcard data.
2020-02-20 13:59:28 +01:00
Armin Novak
11d3ea3b43
Fix #5847 : Missing length check to trace smartcard buffers.
2020-02-10 14:28:38 +01:00
Armin Novak
11f2532242
Added unified NDR pointer reading.
2020-01-24 13:52:43 +01:00
Armin Novak
7b50ed887e
Fixed missing length checks for smartcard IRP read.
2020-01-24 13:23:40 +01:00
Armin Novak
f4ee8d92a7
Fixed smartcard type mismatches.
2020-01-23 10:39:43 +01:00
Armin Novak
f0db6f2ead
Unified smartcart multistring conversion.
2020-01-23 10:07:54 +01:00
Armin Novak
ee7950c95c
Fixed type mismatches on allocation.
2020-01-23 09:48:20 +01:00
Armin Novak
ec5881e3f2
Fixed smartcard_SetAttrib_Decode call type
2020-01-23 09:32:34 +01:00
Armin Novak
dfe7b8c8da
Implement missing functions for new smartcard
...
Newer smartcard channel behaviour expects a lot more callbacks
being implemented. This change provides them.
2020-01-13 11:27:37 +01:00
Armin Novak
7c243da6e1
Remove symbols exported by accident.
2019-12-02 10:57:31 +01:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
Armin Novak
59b4988f56
Fixed compilation warnings.
2019-10-16 14:54:05 +02:00
Bernhard Miklautz
a311075202
fix [channels/smartcard]: fix StatusW_Call
...
According to 2.2.2.18 Status_Call cbAtrLen is unused an must be ignored
upon receipt.
2019-07-30 09:48:47 +02:00
Armin Novak
60a82854c1
For smartcard trace functions use const arguments
2019-05-08 15:13:03 +02:00
Armin Novak
4b72a85e91
Fixed possible memory leak.
2019-05-08 15:12:40 +02:00
Armin Novak
8f7e1579fd
Silenced unused parameter warnings in smartcard trace
2019-05-08 12:27:51 +02:00