Skip to content

Dacav/bio drop strict ifs#962

Open
dacav wants to merge 4 commits intomainfrom
dacav/bio-drop-strict-ifs
Open

Dacav/bio drop strict ifs#962
dacav wants to merge 4 commits intomainfrom
dacav/bio-drop-strict-ifs

Conversation

@dacav
Copy link
Copy Markdown
Contributor

@dacav dacav commented Apr 1, 2026

Fixes #960

@dacav dacav force-pushed the dacav/bio-drop-strict-ifs branch 4 times, most recently from 1873954 to 9b06040 Compare April 2, 2026 13:55
@dacav dacav marked this pull request as ready for review April 2, 2026 13:58
Comment thread src/bio.c
Comment thread src/bio.c
@dacav dacav force-pushed the dacav/bio-drop-strict-ifs branch from 9b06040 to 0180b8f Compare April 7, 2026 12:41
Copy link
Copy Markdown
Contributor

@LDVG LDVG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we accidentally revert the removed PIN/token check for fido_bio_dev_set_template_name()? 🙂

Comment thread src/bio.c Outdated

/* If available, prefer cached PUAT */
if ((puat = fido_dev_puat_blob(dev)) != NULL)
return fido_blob_set(token, puat->ptr, puat->len);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to translate a potential -1 return value here to FIDO_ERR_INTERNAL?

Copy link
Copy Markdown
Contributor Author

@dacav dacav Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ach, Pitfall!
I see that fido_blob_set() is violating the return value convention: should it return a boolean perhaps?
Thanks for spotting.

@dacav dacav force-pushed the dacav/bio-drop-strict-ifs branch from 0180b8f to f83ec82 Compare April 8, 2026 07:53
@dacav dacav marked this pull request as draft April 8, 2026 08:01
@dacav dacav force-pushed the dacav/bio-drop-strict-ifs branch from f83ec82 to e843355 Compare April 8, 2026 08:07
@dacav dacav marked this pull request as ready for review April 8, 2026 08:24
dacav added 4 commits April 8, 2026 13:16
The conditional invocation of bio_get_uv_token() is extracted from bio_tx()
into a separate resolve_token(), which can be invoked from individual
calling sites of bio_tx().

The logic is purposedly changed: resolve_token() will invoke
bio_get_uv_token() even if PIN is NULL. Such operation might be successful
if the Authenticator supports some form of UV.
The conditionals are too strict, since a form of UV might be supported
by the Authenticator.
@dacav dacav force-pushed the dacav/bio-drop-strict-ifs branch from e843355 to e09ff5b Compare April 8, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Remove strict checks in bio

2 participants