Skip to content

Conversation

@tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Nov 6, 2025

Alternative implementation to #1993 : Add Timestamp UTC | TOTP code: XXXXXX | Press Esc to continue... before TPM DUK passphrase prompt (see screenshot below).

Added function show_totp_until_esc() in etc/functions:

  • Shows "[TIMESTAMP] | TOTP code: XXXXXX | Press Esc to continue..." (pipe-separated).
  • Caches TOTP for 1 second and only redraws when the second changes (avoids flicker).
  • Polls input every 200 ms and returns immediately on ESC, printing a blank line for separation.
  • Shows "TOTP unavailable" when a code cannot be fetched (initial or failure).

Qemu:
./docker_repro.sh make BOARD=qemu-coreboot-fbwhiptail-tpm2-hotp-prod_quiet USB_TOKEN=Nitrokey3NFC PUBKEY_ASC=pubkey.asc inject_gpg run

2025-11-06-120814

@Tonux599

…re prompting for TPM DUK passphrase

Added function show_totp_until_esc() in etc/functions:
- Shows "[TIMESTAMP] | TOTP code: XXXXXX | Press Esc to continue..." (pipe-separated).
- Caches TOTP for 1 second and only redraws when the second changes (avoids flicker).
- Polls input every 200 ms and returns immediately on ESC, printing a blank line for separation.
- Shows "TOTP unavailable" when a code cannot be fetched (initial or failure).

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
@tlaurion
Copy link
Collaborator Author

tlaurion commented Nov 6, 2025

@Tonux599 hmmm just saw your comment at #1993 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant