[fido] FidoDevice::Cancel does not cancel ongoing operations |
|||
Issue descriptionIn the current implementation both FidoHidDevice and FidoBleDevice treat cancel commands as regular messages that will be en-queued if the underlying device is currently busy [1,2]. The net effect of this is that the ongoing operation will never be cancelled, since the cancel command will only be issued once the operation completes or errors out. Fixing this will require a method that immediately sends messages to the device as soon as possible. [1] https://codesearch.chromium.org/chromium/src/device/fido/fido_ble_device.cc?l=54-60&rcl=b891d95d59d0d2e98dc1d4683f91089eca2da408 [2] https://codesearch.chromium.org/chromium/src/device/fido/fido_hid_device.cc?l=41-47,95-96&rcl=b891d95d59d0d2e98dc1d4683f91089eca2da408
,
Jun 22 2018
,
Jun 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/12ed67d3c95b9239a3d580f5437c203ad3dd56f6 commit 12ed67d3c95b9239a3d580f5437c203ad3dd56f6 Author: Jun Choi <hongjunchoi@chromium.org> Date: Sat Jun 23 22:49:25 2018 Fix Cancel operation on FidoHidDevice Current Cancel operation on FidoHidDevice does not conform to behavior defined by the CTAP spec. More specifically, CTAP spec mandates that once Cancel operation is invoked, all pending transactions must be deleted and cancel command must be sent before any remaining transactions. This is not how current FidoHidDevice works. Currently FidoHidDevice will simply add Cancel command packet into a queue and wait for prior transaction to finish before sending Cancel command to the device. Bug: 833806 Change-Id: I66f67e1ff36aa724c0340fd6630a941da911921b Reviewed-on: https://chromium-review.googlesource.com/1111617 Commit-Queue: Jun Choi <hongjunchoi@chromium.org> Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#569914} [modify] https://crrev.com/12ed67d3c95b9239a3d580f5437c203ad3dd56f6/device/fido/fido_hid_device.cc [modify] https://crrev.com/12ed67d3c95b9239a3d580f5437c203ad3dd56f6/device/fido/fido_hid_device.h [modify] https://crrev.com/12ed67d3c95b9239a3d580f5437c203ad3dd56f6/device/fido/fido_hid_device_unittest.cc
,
Dec 7
|
|||
►
Sign in to add a comment |
|||
Comment 1 by hongjunchoi@chromium.org
, Jun 22 2018Owner: hongjunchoi@chromium.org
Status: Started (was: Untriaged)