Fix OATH calculation result when called multiple times.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-03-30 00:37:31 +02:00
parent 8c90dd55bd
commit 05afcd706e

View File

@@ -336,6 +336,7 @@ int calculate_oath(uint8_t truncate,
if (r != 0) {
return CCID_EXEC_ERROR;
}
res_APDU_size = 0;
if (truncate == 0x01) {
res_APDU[res_APDU_size++] = 4 + 1;
res_APDU[res_APDU_size++] = key[1];