mirror of
https://github.com/polhenarejos/pico-openpgp.git
synced 2026-08-29 16:11:08 +01:00
Reject invalid certificate occurrence as wrong P1P2
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -47,9 +47,12 @@ int cmd_select_data(void) {
|
||||
else {
|
||||
return SW_WRONG_DATA();
|
||||
}
|
||||
if (fid != EF_CH_CERT || P1(apdu) >= 3) {
|
||||
if (fid != EF_CH_CERT) {
|
||||
return SW_REFERENCE_NOT_FOUND();
|
||||
}
|
||||
if (P1(apdu) >= 3) {
|
||||
return SW_WRONG_P1P2();
|
||||
}
|
||||
if (!(ef = file_search_by_fid(fid, NULL, SPECIFY_EF))) {
|
||||
return SW_REFERENCE_NOT_FOUND();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user