mqtt-cli icon indicating copy to clipboard operation
mqtt-cli copied to clipboard

auth.server.cafile property specified in config.properties is not working

Open dlowrey opened this issue 1 year ago • 2 comments

Expected behavior

When config.properties contains valid values for:

auth.server.cafile
auth.client.cert
auth.client.key

I should be able to do operations like con, pub, sub without having to specify certificate information.

Actual behavior

When attempting to do a con via the interactive shell (started via mqtt sh), I only get:

No trusted certificate found

My colleagues and I have troubleshooted this all day (on Mac OSX and Windows), and we discovered that if we specify the --ca-cert option (con --ca-cert ...) everything works fine, and the other client certificate values get picked up from the config.properties files correctly.

To Reproduce

Must have a MQTT broker set up for mTLS.

Steps

Specify the below keys with valid values in your config.properties file:

auth.server.cafile
auth.client.cert
auth.client.key

Then start interactive shell

mqtt sh

And try to connect to a broker

con -i myIdentifier

Reproducer code

Details

I think a similar issue was opened previously: https://github.com/hivemq/mqtt-cli/issues/125, and we had some MacOSX users who had no issue with this using 4.13.0, but once they upgraded to 4.29.0 it broke.

  • Affected MQTT CLI version(s): 4.29.0
  • Used JVM version: 11, 23

dlowrey avatar Jun 13 '24 21:06 dlowrey