Commit Graph
47 Commits
Author SHA1 Message Date
Robin Krahl 96bf04e97c Replace trussed dependency with trussed-core 2025-01-08 09:59:25 +01:00
Robin Krahl 6edcb14f6c Add CI workflow 2025-01-06 17:55:39 +01:00
Robin Krahl dcff9009c3 Remove ctap-types dependency
We only need the ctap-types for six error codes.  It makes more sense to
define these error codes directly inside the crate so that we don’t need
to make usbd-ctaphid releases just to bump ctap-types.

Arguably, this also makes the code more correct:  Previously, we used a
type that represents the CTAP2 error codes, but we actually want to use
the CTAPHID error codes.  Those happen to be the same, but it could be a
cause for confusion.

In the future, we could also use the ctaphid-types crate instead.
2024-06-03 10:06:23 +02:00
Robin Krahl 1db2e014f2 Don’t reset state on CTAPHID_CANCEL
When we receive a CTAPHID_CANCEL command and cancel a user presence
check, we still need to respond to the original command, typically with
a CTAP2_ERR_KEEPALIVE_CANCEL error.  And if we already finished
executing the command, there is no harm in sending out its response.

With this patch, we never discard responses that have already been
calculated.  Also, we never reset the pipe state and just finish the
normal command flow.  We just set the interrupt flag if the
authenticator is currently processing a command.
2024-02-29 21:34:23 +01:00
Robin Krahl eda9b76c36 Support invalid CTAPHID commands
Previously, we just ignored invalid CTAPHID commands.  With this patch,
we return a CTAPHID_INVALID_COMMAND error.
2024-02-22 13:31:39 +01:00
Sosthène Guédonandsosthene-nitrokey 3f24df2f8b Use reference to the response rather than copying it 2023-07-12 11:39:17 +02:00
Sosthène Guédonandsosthene-nitrokey e9cbf904f5 Use merged PRs 2023-06-20 17:37:08 +02:00
Sosthène Guédonandsosthene-nitrokey d92deebf24 Fix typo 2023-06-20 17:37:08 +02:00
Sosthène Guédonandsosthene-nitrokey 913f61527c Bump deps 2023-06-20 17:37:08 +02:00
Sosthène Guédonandsosthene-nitrokey 33a47ec70b Update deps 2023-06-20 17:37:08 +02:00
Sosthène Guédonandsosthene-nitrokey d85acccb8a Use released ref-swap 2023-06-20 17:37:08 +02:00
Sosthène Guédonandsosthene-nitrokey 9dc54d6de8 Add request interrupt mechanism 2023-06-20 17:37:08 +02:00
Sosthène GuédonandMarkus Meissner 2f658fbe84 Use upstream ctaphid-dispatch 2023-06-20 16:18:04 +02:00
Sosthène GuédonandMarkus Meissner e415b176c8 Add pipe lifetime 2023-06-20 16:18:04 +02:00
Sosthène GuédonandMarkus Meissner 2580bc6944 Migrate to interchange 0.3.0 2023-06-20 16:18:04 +02:00
Robin Krahl 46070aa05f Check if response message fits in buffer
Our packet buffer is smaller than the response buffer used by
ctaphid-dispatch.  Therefore we have to check whether a response fits
into the buffer and return an error if not.
2023-03-01 10:13:18 +01:00
Nicolas Stalder 2f29e0126f cargo fmt 0.1.0 2023-01-24 22:57:14 +01:00
Nicolas Stalder 51d2d8e72d clippy 2023-01-24 22:57:05 +01:00
Nicolas Stalder 2aa15b7011 Prepare release 2023-01-24 22:54:55 +01:00
Nicolas StalderandNicolas Stalder d872dbb815 Allow setting versions in CTAPHID_INIT 2022-03-17 23:23:14 +01:00
Nicolas StalderandNicolas Stalder a2104a29b3 Configurably larger CTAP pipe; winking 2022-03-17 23:23:14 +01:00
Nicolas StalderandNicolas Stalder 1d97873e72 Bump dependencies to published versions 2022-03-17 23:23:14 +01:00
Nicolas StalderandNicolas Stalder 2c81388d13 Inline never in usbd-{ccid,ctaphid} 2022-03-17 23:23:14 +01:00
Conor Patrick 60ad119083 only send keepalive ctaphid messages while handling cbor messages 2022-01-24 17:27:26 -08:00
Nicolas StalderandNicolas Stalder 91d8431dee Extract admin-app 2021-11-25 00:46:10 +01:00