1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

winpgnt: mark encrypted/encryptable keys in GUI key list.

Now they have '(encrypted)' or '(re-encryptable)' after them, the same
as Unix Pageant.

Mostly this just involved tinkering with the code in winpgnt.c that
makes up the entry to put in the list box. But I also had to sprinkle
a few more calls to keylist_update() into the cross-platform
pageant.c, to make sure that the key list window is proactively
updated whenever a key is decrypted, re-encrypted, or loaded in
encrypted-only form.
This commit is contained in:
Simon Tatham
2021-04-02 10:13:01 +01:00
parent c4dc78bd85
commit ceb645b042
2 changed files with 29 additions and 33 deletions

View File

@ -556,6 +556,8 @@ void pageant_passphrase_request_success(PageantClientDialogId *dlgid,
"passphrase prompts");
}
return;
} else {
keylist_update();
}
}
@ -1182,6 +1184,7 @@ static PageantAsyncOp *pageant_make_op(
pk->encrypted_key_file = strbuf_new_nm();
put_datapl(pk->encrypted_key_file, keyfile);
keylist_update();
put_byte(sb, SSH_AGENT_SUCCESS);
pageant_client_log(
pc, reqid, "reply: SSH_AGENT_SUCCESS (added encrypted"
@ -1209,6 +1212,7 @@ static PageantAsyncOp *pageant_make_op(
PageantKey *added = add234(keytree, pk);
assert(added == pk); (void)added;
keylist_update();
put_byte(sb, SSH_AGENT_SUCCESS);
pageant_client_log(pc, reqid, "reply: SSH_AGENT_SUCCESS (made"
" new encrypted-only key record)");
@ -1258,6 +1262,7 @@ static PageantAsyncOp *pageant_make_op(
goto responded;
}
keylist_update();
put_byte(sb, SSH_AGENT_SUCCESS);
pageant_client_log(pc, reqid, "reply: SSH_AGENT_SUCCESS");
break;
@ -1291,6 +1296,7 @@ static PageantAsyncOp *pageant_make_op(
if (nsuccesses == 0 && nfailures > 0) {
fail("no key could be re-encrypted");
} else {
keylist_update();
put_byte(sb, SSH_AGENT_SUCCESS);
put_uint32(sb, nfailures);
pageant_client_log(pc, reqid, "reply: SSH_AGENT_SUCCESS "