mirror of
https://github.com/polhenarejos/pico-fido.git
synced 2024-09-20 03:10:10 +00:00
OTP static passwords are 38 bytes length.
A static password uses fixed, uid and key fields (sum 38). However, Yubikey sets short_ticket flag which implies the half of the password is sent. Fixes #29. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
34bfc3b2ef
commit
a9be759da3
@ -270,10 +270,11 @@ int otp_button_pressed(uint8_t slot) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (otp_config->cfg_flags & SHORT_TICKET || otp_config->cfg_flags & STATIC_TICKET) {
|
else if (otp_config->cfg_flags & SHORT_TICKET || otp_config->cfg_flags & STATIC_TICKET) {
|
||||||
|
uint8_t fixed_size = FIXED_SIZE + UID_SIZE + KEY_SIZE;
|
||||||
if (otp_config->cfg_flags & SHORT_TICKET) {
|
if (otp_config->cfg_flags & SHORT_TICKET) {
|
||||||
otp_config->fixed_size /= 2;
|
fixed_size /= 2;
|
||||||
}
|
}
|
||||||
add_keyboard_buffer(otp_config->fixed_data, otp_config->fixed_size, false);
|
add_keyboard_buffer(otp_config->fixed_data, fixed_size, false);
|
||||||
if (otp_config->tkt_flags & APPEND_CR) {
|
if (otp_config->tkt_flags & APPEND_CR) {
|
||||||
append_keyboard_buffer((const uint8_t *) "\x28", 1);
|
append_keyboard_buffer((const uint8_t *) "\x28", 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user