Fix OATH calculation result when called multiple times.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -336,6 +336,7 @@ int calculate_oath(uint8_t truncate,
|
|||||||
if (r != 0) {
|
if (r != 0) {
|
||||||
return CCID_EXEC_ERROR;
|
return CCID_EXEC_ERROR;
|
||||||
}
|
}
|
||||||
|
res_APDU_size = 0;
|
||||||
if (truncate == 0x01) {
|
if (truncate == 0x01) {
|
||||||
res_APDU[res_APDU_size++] = 4 + 1;
|
res_APDU[res_APDU_size++] = 4 + 1;
|
||||||
res_APDU[res_APDU_size++] = key[1];
|
res_APDU[res_APDU_size++] = key[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user