mirror of git://git.gnupg.org/gnupg.git
scd: Add condition for VERIFY with 0x82.
* scd/app-openpgp.c (verify_chv2): Check availability of keys in question. -- With buggy Gnuk (<= 1.2.15), when no encr/auth keys are available, it fails decrementing the signature error counter. This change can avoid the issue. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
90a87d96ea
commit
af189be481
|
@ -2565,10 +2565,15 @@ verify_chv2 (app_t app, ctrl_t ctrl,
|
||||||
if (app->did_chv2)
|
if (app->did_chv2)
|
||||||
return 0; /* We already verified CHV2. */
|
return 0; /* We already verified CHV2. */
|
||||||
|
|
||||||
rc = verify_a_chv (app, ctrl, pincb, pincb_arg, 2, 0, &pinvalue, &pinlen);
|
if (app->app_local->pk[1].key || app->app_local->pk[2].key)
|
||||||
if (rc)
|
{
|
||||||
return rc;
|
rc = verify_a_chv (app, ctrl, pincb, pincb_arg, 2, 0, &pinvalue, &pinlen);
|
||||||
app->did_chv2 = 1;
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
app->did_chv2 = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rc = 0;
|
||||||
|
|
||||||
if (!app->did_chv1 && !app->force_chv1 && pinvalue)
|
if (!app->did_chv1 && !app->force_chv1 && pinvalue)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue