• Martin Kreichgauer's avatar
    fido: stop discoveries before the end of a WebAuthn request · b7747db8
    Martin Kreichgauer authored
    This adds a FidoDiscovery::Stop() method that can be used to terminate
    authenticator discovery without destroying the instance.
    
    FidoDeviceDiscovery upon receiving Stop() will ignore all calls to
    AddDevice() and RemoveDevice(). FidoCableDiscovery inherits this
    behavior and also calls Unregister() on all pending BleAdvertisements.
    
    Lastly, AuthenticatorCommon is changed to stop all discoveries of the
    current FidoRequestHandler prior to signaling failure of the request to
    the UI layer.
    
    This fixes an issue where Chrome might continue to advertise caBLE EIDs
    while the UI is showing an error sheet, e.g. because the request timed
    out or because one of the authenticator returned an error that causes
    the UI to show its retry error sheet.
    
    Bug: 1046164
    Change-Id: Ic5678f13a10efbb56277e6bd3485dd985c8ab0c3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036266
    Commit-Queue: Martin Kreichgauer <martinkr@google.com>
    Reviewed-by: default avatarAdam Langley <agl@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#739073}
    b7747db8
fido_discovery_base.cc 465 Bytes