From b72df4538e4301459624954d4180929cbe369570 Mon Sep 17 00:00:00 2001 From: Christoph Krey Date: Tue, 5 Nov 2024 10:44:04 +0100 Subject: [PATCH] ctrl with automatic TLS mode with PSK Signed-off-by: Christoph Krey --- apps/mosquitto_ctrl/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/mosquitto_ctrl/client.c b/apps/mosquitto_ctrl/client.c index c35471713..37db14ffb 100644 --- a/apps/mosquitto_ctrl/client.c +++ b/apps/mosquitto_ctrl/client.c @@ -127,7 +127,11 @@ int client_request_response(struct mosq_ctrl *ctrl) int rc; time_t start; - if(ctrl->cfg.cafile == NULL && ctrl->cfg.capath == NULL && !ctrl->cfg.tls_use_os_certs && ctrl->cfg.port != 8883 && !ctrl->cfg.psk){ + if(ctrl->cfg.cafile == NULL && ctrl->cfg.capath == NULL && !ctrl->cfg.tls_use_os_certs && ctrl->cfg.port != 8883 +# ifdef FINAL_WITH_TLS_PSK + && !ctrl->cfg.psk +# endif + ){ 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"); }