carta
fido_dev_get_touch_status(3)

fido_dev_get_touch_status3

Asynchronously wait for touch on a fido2 authenticator

Part of fido_dev_get_touch_begin(3).

Usage

int

int

Overview

The functions described in this page allow an application to asynchronously wait for touch on a FIDO2 authenticator. This is useful when multiple authenticators are present and the application needs to know which one to use.

The fido_dev_get_touch_begin() function initiates a touch request on dev.

The fido_dev_get_touch_status() function continues an ongoing touch request on dev, blocking up to ms milliseconds. On success, touched will be updated to reflect the touch request status. If touched is 1, the device was touched, and the touch request is terminated. If touched is 0, the application may call fido_dev_get_touch_status() to continue the touch request, or fido_dev_cancel() to terminate it.

Return values

The error codes returned by fido_dev_get_touch_begin() and fido_dev_get_touch_status() are defined in ⟨fido/err.h⟩. On success, FIDO_OK is returned.

Examples

Please refer to examples/select.c in libfido2's source tree.

Caveats

The fido_dev_get_touch_status() function will cause a command to be transmitted to U2F authenticators. These transmissions should not exceed a frequency of 5Hz.

History

  • Arch Linux 2026-11-01 to Debian 12 (Bookworm): the text shown here
  • Debian 11 (Bullseye)

From libfido2 1.17.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.