Skip to content

Commit

Permalink
OTP: settings: Add --serial-usb-visible option
Browse files Browse the repository at this point in the history
Add a user-facing option to `ykman otp settings` to enable
SERIAL_USB_VISIBLE. The underlying functionality is already
implemented in yubikit.

Signed-off-by: Philip Eklöf <[email protected]>
  • Loading branch information
phiekl committed Dec 15, 2024
1 parent 84e340e commit 5b84a9b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ykman/_cli/otp.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,12 @@ def hotp(ctx, slot, key, digits, counter, identifier, no_enter, force):
help="use scancodes for numeric keypad when sending digits "
"(helps for some keyboard layouts)",
)
@click.option(
"--serial-usb-visible",
is_flag=True,
show_default=True,
help="enable serial number in the USB iSerial field",
)
def settings(
ctx,
slot,
Expand All @@ -871,6 +877,7 @@ def settings(
enter,
pacing,
use_numeric_keypad,
serial_usb_visible,
force,
):
"""
Expand Down Expand Up @@ -926,6 +933,7 @@ def settings(
UpdateConfiguration()
.append_cr(enter)
.use_numeric(use_numeric_keypad)
.serial_usb_visible(serial_usb_visible)
.pacing(pacing_10ms, pacing_20ms),
new_access_code,
ctx.obj["access_code"],
Expand Down

0 comments on commit 5b84a9b

Please sign in to comment.