Skip to content

Commit

Permalink
ctrl: Add warning if connecting without encryption.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Nov 30, 2020
1 parent 692fa55 commit 757888b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/mosquitto_ctrl/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 757888b

Please sign in to comment.