823 Commits
Author SHA1 Message Date
Ludvig Michaelsson 4e5774951d info: add fido_cbor_info_encid_{len,ptr}() 2025-10-28 13:22:05 +01:00
Ludvig Michaelsson 55256f0eb3 info: add fido_cbor_info_long_touch_reset() 2025-10-28 11:42:45 +01:00
Ludvig Michaelsson af401e2ab5 info: add fido_cbor_info_uv_count_since_pin() 2025-10-28 11:41:15 +01:00
Ludvig Michaelsson 76e74f2b5f info: add fido_cbor_info_attfmts_{ptr,len}() 2025-10-28 11:39:48 +01:00
Ondrej Krc-Jediny 69efd88453 nfc: only append Le field in final APDU segment 2025-04-22 13:38:57 +03:00
Ludvig Michaelsson 76b074cb86 winhello: support entattest 2024-11-06 15:59:34 +01:00
Ludvig Michaelsson d5e58844ce cred: export fido_cred_{,set_}entattest() 2024-11-06 15:59:34 +01:00
Ludvig Michaelsson 45fbb1709f cred: add fido_cred_entattest()
Returns true if an enterprise attestation was returned for this
credential, false otherwise.
2024-11-06 15:59:34 +01:00
Ludvig Michaelsson 7a3c8331e4 cred: add fido_cred_set_entattest()
Can be used to enable enterprise attestation.
2024-11-06 15:59:34 +01:00
James Zhang 2a077ca2f1 Allow len < 16 for aes256-gcm encryption 2024-10-15 09:56:01 +03:00
Ludvig Michaelsson 5c7ed8fe86 fuzz: unpoison buffer after arc4random_buf()
MSAN does not realise that the iv buffer for aes256_cbc_fips() is in
fact initialized by this function call. This path and subsequent use of
the "uninitialised" value was hit when upgrading to Ubuntu 24.04 (which
ships a version of glibc that implements arc4random_buf()).
2024-10-08 16:46:52 +03:00
Ludvig Michaelsson 2df45d2f71 nfc: chain rapdus in rx_init
Some cards erroneously interpret Le=0 as requesting no response data.
When this happens, they send a 61nn response instead.
2024-09-16 13:51:58 +03:00
Ludvig Michaelsson a72667dc67 nfc: move function definition, no functional change 2024-09-16 13:51:58 +03:00
James Zhang 98aa42849b U2F key_lookup: do not fail upon SW_WRONG_LENGTH (0x6700) 2024-09-16 07:44:09 +02:00
Kostas Georgantas a0a374151c nfc: specify cla on get response
based on cbor vs u2f
2024-09-12 14:27:13 +03:00
Theo Buehler 723788f850 Attempt to fix Windows build 2024-03-22 10:18:08 +01:00
Theo Buehler d147c4b172 Simplify getting an EVP_MD for all OpenSSL forks
In all versions of OpenSSL, EVP_sha{1,256}() return a pointer to
static read-only data. There is no need to copy that data into a
buffer that is immediately freed after use.

In LibreSSL and OpenSSL 1.x, EVP_PKEY_CTX_set_signature_md() is a
wrapper around EVP_PKEY_ctrl() whose void * argument isn't const
(contrary to the documented signature), so we need to cast const
away in some way. This preserves rs*_get_EVP_MD() to contain the
pragma pollution necessary due to -Werror -Wcast-qual.

The negative performance impact of calling EVP_sha*() multiple
times called out in the OpenSSL 3.x application should not apply
in this code.

Closes: #794
2024-03-22 10:18:08 +01:00
Ludvig Michaelsson 89c5ea3d5c cbor: expose cbor_decode_attobj() instead of callback 2024-03-20 10:35:44 +02:00
Ludvig Michaelsson d9351b8155 cbor: tweak previous; restore decode_attobj() 2024-03-20 10:35:44 +02:00
viveks 33c2a876f7 cred: add fido_cred_set_attobj()
New routines to set attestation object containing CBOR encoded authData,
fmt and attStmt.
2024-03-20 10:35:44 +02:00
Ludvig Michaelsson b465d28c87 cbor: add decode_x5c_array()
Adds explicit checks that the target array is empty when we parse the
CBOR map. This triggers a failure for malformed responses with duplicate
keys.
2024-02-08 13:27:54 +02:00
viveks 19d349e649 Change attstmt to handle x5c array/list; update APIs too 2024-02-08 13:27:54 +02:00
Gabriel Kihlman c4c768581e hid_netbsd: move null pointer check before dereference
Found when trying out smatch
2024-02-05 14:04:58 +01:00
Ludvig Michaelsson 97235dae6a hid_linux: tweak previous 2024-01-31 12:35:01 +01:00
Jó Ágila Bitsch 64e93db4f4 hidraw: fallback to HID_NAME
If we can't get the vendor/product string of the USB attributes,
fallback to the HID_NAME string collected from the uevent.
2024-01-31 12:35:01 +01:00