Tobias Wiese
a94e52cb9e
nfc_linux: Don't close stdin if fido_nl_new fails
...
The call to nfc_free is not needed because when calloc fails ctx will be
NULL and nfc_free will do nothing, when fido_nl_new() fails ctx->nl will
be null and does not need to be freed.
Additionally ctx->fd is 0 (due to calloc zero-initializing ctx) and
should not be closed.
Therefore I replaced this with a free call to just undo the (potential)
allocation by calloc.
Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com >
2025-12-19 08:46:52 +01:00
pedro martelletto
f1a74c8f27
src: specify SPDX-License-Identifier; #623
2022-08-02 10:59:49 +02:00
pedro martelletto
f318030301
nfc_linux: select the fido applet on manifest
...
discussed with and feedback from Ludvig
2022-05-23 15:05:47 +02:00
pedro martelletto
a16e5ddd52
nfc_linux: switch to fido_to_uint64()
2022-03-03 17:03:19 +01:00
pedro martelletto
278f7cc096
nfc_linux: style tweaks; no binary change
2022-02-23 17:01:45 +01:00
pedro martelletto
237e9b17ca
nfc_linux: split fido_nfc_[rt]x into nfc.c
...
these will be reused by upcoming pcsc support
2022-02-23 14:44:17 +01:00
pedro martelletto
92dca597a3
nfc_linux: set p1 to 0, as we don't support NFCCTAP_GETRESPONSE
...
we currently set it to 0x80, signalling support for
NFCCTAP_GETRESPONSE (instruction 0x11), which we don't implement
in libfido2.
2022-02-23 09:31:21 +01:00
pedro martelletto
dcbdd57752
nfc_linux: reset pointer after failed asprintf()
2022-02-17 16:59:37 +01:00
Ludvig Michaelsson
d008e5dfda
nfc: measure and subtract duration of rx from timeout
2021-09-24 14:57:03 +02:00
pedro martelletto
758e88ecad
nfc_linux: accept devices without id strings
...
for consistency with hid_*
2021-09-23 17:04:48 +02:00
pedro martelletto
a1fd991e3c
nfc: work with nfc:// paths
2021-08-20 12:53:19 +02:00
pedro martelletto
59b98a1147
nfc_linux: only list readers with attached targets
2021-08-20 12:05:18 +02:00
pedro martelletto
3d3947a0a3
trim includes
2021-02-07 17:10:08 +01:00
pedro martelletto
abe77473c1
usb vendor/product ids span 16 bits; gh#264
2021-01-14 15:00:41 +01:00
Ludvig Michaelsson
f480cd156f
nfc_linux: make rx_msg() endian-independent
2021-01-04 13:56:44 +01:00
pedro martelletto
227d4e6c87
nfc: switch to new fido_log_xxd()
2021-01-03 09:11:04 +01:00
pedro martelletto
7032a63c1e
use fido_log_error() in a few more places
2020-12-30 09:36:41 +01:00
pedro martelletto
01d5024ac8
nfc_linux: set flags in rx_init() when fuzzing
2020-12-26 13:33:14 +01:00
pedro martelletto
3053319ecd
fuzz: enter nfc_linux.c from fuzz_{assert,cred}
2020-12-26 07:58:49 +01:00
pedro martelletto
67c4a14ede
Adapt netlink.c and nfc_linux.c to dev_set_sigmask
...
Adapt the recently introduced netlink and nfc_linux code to
fido_dev_set_sigmask().
2020-12-25 09:58:25 +01:00
pedro martelletto
0a1a5ce899
experimental nfc support on linux
...
joint work w/ Ludvig Michaelsson, who did a lot of the heavy
lifting. thank you!
2020-12-22 13:08:32 +01:00