Changeset View
Changeset View
Standalone View
Standalone View
scd/app-openpgp.c
Context not available. | |||||
wipe_and_free (pinvalue, pinlen); | wipe_and_free (pinvalue, pinlen); | ||||
} | } | ||||
// Prompt to touch/ack the card. | |||||
if (opt.ack_prompt) | |||||
pincb (pincb_arg, _("--ack"), NULL); | |||||
if (app->app_local->cardcap.ext_lc_le | if (app->app_local->cardcap.ext_lc_le | ||||
&& app->app_local->keyattr[0].key_type == KEY_TYPE_RSA | && app->app_local->keyattr[0].key_type == KEY_TYPE_RSA | ||||
Context not available. | |||||
cache_pin (app, ctrl, 1, NULL); | cache_pin (app, ctrl, 1, NULL); | ||||
} | } | ||||
// Dismiss prompt after signing (or timing out) | |||||
if (opt.ack_prompt) | |||||
pincb (pincb_arg, NULL, NULL); | |||||
return rc; | return rc; | ||||
} | } | ||||
Context not available. | |||||
exmode = 0; | exmode = 0; | ||||
le_value = 0; | le_value = 0; | ||||
} | } | ||||
// Prompt to touch/ack the card. | |||||
if (opt.ack_prompt) | |||||
pincb (pincb_arg, _("--ack"), NULL); | |||||
rc = iso7816_internal_authenticate (app_get_slot (app), exmode, | rc = iso7816_internal_authenticate (app_get_slot (app), exmode, | ||||
indata, indatalen, le_value, | indata, indatalen, le_value, | ||||
outdata, outdatalen); | outdata, outdatalen); | ||||
// Dismiss prompt after authenticating (or timing out) | |||||
if (opt.ack_prompt) | |||||
pincb (pincb_arg, NULL, NULL); | |||||
if (gpg_err_code (rc) == GPG_ERR_TIMEOUT) | if (gpg_err_code (rc) == GPG_ERR_TIMEOUT) | ||||
clear_chv_status (app, ctrl, 1); | clear_chv_status (app, ctrl, 1); | ||||
} | } | ||||
Context not available. | |||||
else | else | ||||
exmode = le_value = 0; | exmode = le_value = 0; | ||||
// Prompt to touch/ack the card. | |||||
if (opt.ack_prompt) | |||||
pincb (pincb_arg, _("--ack"), NULL); | |||||
rc = iso7816_decipher (app_get_slot (app), exmode, | rc = iso7816_decipher (app_get_slot (app), exmode, | ||||
indata, indatalen, le_value, padind, | indata, indatalen, le_value, padind, | ||||
outdata, outdatalen); | outdata, outdatalen); | ||||
xfree (fixbuf); | xfree (fixbuf); | ||||
// Dismiss prompt after deciphering (or timing out) | |||||
if (opt.ack_prompt) | |||||
pincb (pincb_arg, NULL, NULL); | |||||
if (!rc && app->app_local->keyattr[1].key_type == KEY_TYPE_ECC) | if (!rc && app->app_local->keyattr[1].key_type == KEY_TYPE_ECC) | ||||
{ | { | ||||
unsigned char prefix = 0; | unsigned char prefix = 0; | ||||
Context not available. |