BugFix: set ACCESCOND for changing PIN mode tp PW1, not PW2
Allow PIN_CONFIRM switch with USER PIN level
This commit is contained in:
parent
4733d6f8ba
commit
f8522808b6
@ -183,7 +183,7 @@ int gpg_apdu_pso(unsigned int pso) {
|
|||||||
|
|
||||||
if ((key == NULL) || (key->size != ksz)) {
|
if ((key == NULL) || (key->size != ksz)) {
|
||||||
THROW(SW_CONDITIONS_NOT_SATISFIED);
|
THROW(SW_CONDITIONS_NOT_SATISFIED);
|
||||||
return 0;
|
return SW_CONDITIONS_NOT_SATISFIED;
|
||||||
}
|
}
|
||||||
msg_len = G_gpg_vstate.io_length - G_gpg_vstate.io_offset;
|
msg_len = G_gpg_vstate.io_length - G_gpg_vstate.io_offset;
|
||||||
sz = cx_rsa_decrypt(key,
|
sz = cx_rsa_decrypt(key,
|
||||||
|
@ -661,13 +661,14 @@ void ui_menu_pinmode_action(unsigned int value) {
|
|||||||
switch (value) {
|
switch (value) {
|
||||||
case PIN_MODE_HOST:
|
case PIN_MODE_HOST:
|
||||||
case PIN_MODE_SCREEN:
|
case PIN_MODE_SCREEN:
|
||||||
if (!gpg_pin_is_verified(gpg_pin_get_pin(PIN_ID_PW2))) {
|
case PIN_MODE_CONFIRM:
|
||||||
|
if (!gpg_pin_is_verified(gpg_pin_get_pin(PIN_ID_PW1))) {
|
||||||
ui_info(PIN_USER, NOT_VERIFIED, ui_menu_pinmode_display,0);
|
ui_info(PIN_USER, NOT_VERIFIED, ui_menu_pinmode_display,0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PIN_MODE_CONFIRM:
|
|
||||||
case PIN_MODE_TRUST:
|
case PIN_MODE_TRUST:
|
||||||
if (!gpg_pin_is_verified(gpg_pin_get_pin(PIN_ID_PW3))) {
|
if (!gpg_pin_is_verified(gpg_pin_get_pin(PIN_ID_PW3))) {
|
||||||
ui_info(PIN_ADMIN, NOT_VERIFIED, ui_menu_pinmode_display,0);
|
ui_info(PIN_ADMIN, NOT_VERIFIED, ui_menu_pinmode_display,0);
|
||||||
|
Loading…
Reference in New Issue
Block a user