Quite a few details need to be just right, to be able to connect over MQTT in the first place. It should be useful to have a subcommand that performs the connection as it would in normal operation, but then simply disconnects and prints out some diagnostics - especially errors if any.
Some details:
Certificate selection
Node-specific if available
Provisioning certificate as fallback
MQTT client name needs to match the CN of the selected certificate
Verification of server certificate
Clean graceful disconnect, not simply an abrup connection termination
This was split out from #9.
Quite a few details need to be just right, to be able to connect over MQTT in the first place. It should be useful to have a subcommand that performs the connection as it would in normal operation, but then simply disconnects and prints out some diagnostics - especially errors if any.
Some details: