1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

CA config: protect against saving a key with no wildcards.

This commit is contained in:
Simon Tatham 2022-05-01 11:29:54 +01:00
parent 6472b5ded7
commit 8d2c643fcb

View File

@ -189,6 +189,11 @@ static void ca_save_handler(dlgcontrol *ctrl, dlgparam *dp,
{
struct ca_state *st = (struct ca_state *)ctrl->context.p;
if (event == EVENT_ACTION) {
if (!count234(st->host_wcs)) {
dlg_error_msg(dp, "No hostnames configured for this key");
return;
}
strbuf *pubkey;
{
const char *error;