From 757888b7f57ace5a45b97067103763b10cbfc8ad Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Mon, 30 Nov 2020 10:47:22 +0000 Subject: [PATCH] ctrl: Add warning if connecting without encryption. --- apps/mosquitto_ctrl/client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/mosquitto_ctrl/client.c b/apps/mosquitto_ctrl/client.c index fc1964c8..00d80df8 100644 --- a/apps/mosquitto_ctrl/client.c +++ b/apps/mosquitto_ctrl/client.c @@ -113,6 +113,10 @@ int client_request_response(struct mosq_ctrl *ctrl) int rc; time_t start; + if(ctrl->cfg.cafile == NULL && ctrl->cfg.capath == NULL){ + fprintf(stderr, "Warning: You are running mosquitto_ctrl without encryption.\nThis means all of the configuration changes you are making are visible on the network, including passwords.\n\n"); + } + mosquitto_lib_init(); mosq = mosquitto_new(ctrl->cfg.id, true, ctrl);