diff options
author | Simon Tatham <anakin@pobox.com> | 2022-05-01 13:29:54 +0300 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2022-05-01 13:29:54 +0300 |
commit | 8d2c643fcb3b475a1bb3c7540b9d634cf16b9f05 (patch) | |
tree | 9e8ae2a43830ac8b88f6c4cf8d1b112ca01ee92a /ssh | |
parent | 6472b5ded76c76ac388598b6998effc73861368b (diff) |
CA config: protect against saving a key with no wildcards.
Diffstat (limited to 'ssh')
-rw-r--r-- | ssh/ca-config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ssh/ca-config.c b/ssh/ca-config.c index 0f82bb35..056622a2 100644 --- a/ssh/ca-config.c +++ b/ssh/ca-config.c @@ -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; |