aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-04-29 17:25:57 +0000
committerWerner Koch <[email protected]>2004-04-29 17:25:57 +0000
commit7d486a0969c6efa46f53e76b8746c8c041f527ad (patch)
treeb3900724d3e48cbed92d7a83dafb277f867007bb /scd/app-openpgp.c
parent* card-util.c (card_edit): Remove PIN verification. (diff)
downloadgnupg-7d486a0969c6efa46f53e76b8746c8c041f527ad.tar.gz
gnupg-7d486a0969c6efa46f53e76b8746c8c041f527ad.zip
* app-openpgp.c (do_setattr): Sync FORCE_CHV1.
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r--scd/app-openpgp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 07420c697..f40951941 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -704,13 +704,14 @@ do_setattr (APP app, const char *name,
static struct {
const char *name;
int tag;
+ int special;
} table[] = {
{ "DISP-NAME", 0x005B },
{ "LOGIN-DATA", 0x005E },
{ "DISP-LANG", 0x5F2D },
{ "DISP-SEX", 0x5F35 },
{ "PUBKEY-URL", 0x5F50 },
- { "CHV-STATUS-1", 0x00C4 },
+ { "CHV-STATUS-1", 0x00C4, 1 },
{ "CA-FPR-1", 0x00CA },
{ "CA-FPR-2", 0x00CB },
{ "CA-FPR-3", 0x00CC },
@@ -735,6 +736,9 @@ do_setattr (APP app, const char *name,
if (rc)
log_error ("failed to set `%s': %s\n", table[idx].name, gpg_strerror (rc));
+ if (table[idx].special == 1)
+ app->force_chv1 = (valuelen && *value == 0);
+
return rc;
}