Fix DKEK key domain creation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -959,7 +959,7 @@ static int cmd_key_domain() {
|
|||||||
file_t *tf = search_dynamic_file(EF_XKEK+p2);
|
file_t *tf = search_dynamic_file(EF_XKEK+p2);
|
||||||
if (2*p2 >= tf_kd_size)
|
if (2*p2 >= tf_kd_size)
|
||||||
return SW_INCORRECT_P1P2();
|
return SW_INCORRECT_P1P2();
|
||||||
if (current_dkeks == 0xff && !tf) //XKEK have always 0xff)
|
if (current_dkeks == 0xff && !tf) //XKEK have always 0xff
|
||||||
return SW_REFERENCE_NOT_FOUND();
|
return SW_REFERENCE_NOT_FOUND();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -996,7 +996,7 @@ static int cmd_key_domain() {
|
|||||||
if (delete_file(tf) != CCID_OK)
|
if (delete_file(tf) != CCID_OK)
|
||||||
return SW_EXEC_ERROR();
|
return SW_EXEC_ERROR();
|
||||||
}
|
}
|
||||||
return SW_OK();
|
low_flash_available();
|
||||||
}
|
}
|
||||||
else if (p1 == 0x2) { //XKEK Key Domain creation
|
else if (p1 == 0x2) { //XKEK Key Domain creation
|
||||||
if (apdu.nc > 0) {
|
if (apdu.nc > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user