Changes
CtapHid.handle
doesn't accept a reference to aAuth
struct anymore and now either returns nil or a struct{ cmd: Cmd, cid: Cid, data: []const u8 }
where cmd is the received command, cid is the channel id, and data is the data related to the command (e.g. cbor encoded CTAP2 command). This allows you to act on specific CTAPHID commands. You can calliterator()
on the returned struct.Auth.handle
now expects two arguments. The first is a pointer to a array of 7609 bytes (the max msg size of CTAPHID); this will probably change in the future. The second argument is the CBOR command. TheAuth.handle
function will write its response to the struct and then return a slice with the message. The slice references the array.
For an overview on how to use the new API, see README.md.