Skip to content

Commit cb1731c

Browse files
author
NIIBE Yutaka
committed
scd: Writing KDF resets auth state.
* scd/app-openpgp.c (do_setattr): Clear auth state. Signed-off-by: NIIBE Yutaka <[email protected]>
1 parent a17d2d1 commit cb1731c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scd/app-openpgp.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2459,7 +2459,7 @@ do_setattr (app_t app, const char *name,
24592459
{ "SM-KEY-MAC", 0x00D2, 3, 0, 1 },
24602460
{ "KEY-ATTR", 0, 0, 3, 1 },
24612461
{ "AESKEY", 0x00D5, 3, 0, 1 },
2462-
{ "KDF", 0x00F9, 3, 0, 1 },
2462+
{ "KDF", 0x00F9, 3, 4, 1 },
24632463
{ NULL, 0 }
24642464
};
24652465
int exmode;
@@ -2507,6 +2507,12 @@ do_setattr (app_t app, const char *name,
25072507
app->force_chv1 = (valuelen && *value == 0);
25082508
else if (table[idx].special == 2)
25092509
parse_login_data (app);
2510+
else if (table[idx].special == 4)
2511+
{
2512+
app->did_chv1 = 0;
2513+
app->did_chv2 = 0;
2514+
app->did_chv3 = 0;
2515+
}
25102516

25112517
return rc;
25122518
}

0 commit comments

Comments
 (0)