Fix order of fields of Yubico OTP.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-04-01 01:15:59 +02:00
parent 5a9de32e02
commit cceb735cc0
No known key found for this signature in database
GPG Key ID: C0095B7870A4CCD3

View File

@ -245,13 +245,13 @@ int otp_button_pressed(uint8_t slot) {
po += 6;
memcpy(po, otp_config->uid, UID_SIZE);
po += UID_SIZE;
*po++ = session_counter[slot - 1];
*po++ = counter & 0xff;
*po++ = counter >> 8;
ts >>= 3;
*po++ = ts & 0xff;
*po++ = ts >> 8;
*po++ = ts >> 16;
*po++ = session_counter[slot - 1];
random_gen(NULL, po, 2);
po += 2;
crc = calculate_crc(otpk + 6, 14);