Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ssh
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-05-01 13:29:54 +0300
committerSimon Tatham <anakin@pobox.com>2022-05-01 13:29:54 +0300
commit8d2c643fcb3b475a1bb3c7540b9d634cf16b9f05 (patch)
tree9e8ae2a43830ac8b88f6c4cf8d1b112ca01ee92a /ssh
parent6472b5ded76c76ac388598b6998effc73861368b (diff)
CA config: protect against saving a key with no wildcards.
Diffstat (limited to 'ssh')
-rw-r--r--ssh/ca-config.c5
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;