mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-22 14:57:02 +01:00
scd: Fix signing authentication status.
* scd/app-openpgp.c (do_sign): Clear DID_CHV1 after signing. -- Cherry-picked from master commit of: 78f542e1f4495195db2e668f9cd41657fb1afc77 We have a corner case: In "not forced" situation and authenticated, and it is changed to "forced", card implementaiton can actually accept signing, but GnuPG requires authentication, because it is "forced". GnuPG-bug-id: 4177 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
8f844ae1cd
commit
7e2b0488d1
@ -4381,7 +4381,7 @@ do_sign (app_t app, const char *keyidstr, int hashalgo,
|
|||||||
log_info (_("signatures created so far: %lu\n"), sigcount);
|
log_info (_("signatures created so far: %lu\n"), sigcount);
|
||||||
|
|
||||||
/* Check CHV if needed. */
|
/* Check CHV if needed. */
|
||||||
if (!app->did_chv1 || app->force_chv1 )
|
if (!app->did_chv1 || app->force_chv1)
|
||||||
{
|
{
|
||||||
char *pinvalue;
|
char *pinvalue;
|
||||||
int pinlen;
|
int pinlen;
|
||||||
@ -4429,6 +4429,9 @@ do_sign (app_t app, const char *keyidstr, int hashalgo,
|
|||||||
}
|
}
|
||||||
rc = iso7816_compute_ds (app->slot, exmode, data, datalen, le_value,
|
rc = iso7816_compute_ds (app->slot, exmode, data, datalen, le_value,
|
||||||
outdata, outdatalen);
|
outdata, outdatalen);
|
||||||
|
if (!rc && app->force_chv1)
|
||||||
|
app->did_chv1 = 0;
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user