tls_engine and tls_keyform in bridge configuration open a local listener
Hi, I have a configuration where I configure a local listener on port 1883.
listener 1883 127.0.0.1
allow_anonymous true
When I add a bridge configuration to an additional file, where either the tls_engine or tls_keyform is set, Mosquitto tries to open an additional local listener on port 1883. This causes Mosquitto to terminate, since port 1883 is already in use by the above configuration. The following configuration is used for the bridge:
connection a
protocol mqtt
address hostb:8883
topic # both 0
bridge_insecure true
tls_engine pkcs11
tls_keyform engine
bridge_cafile my.pem
bridge_certfile my.crt
bridge_keyfile pkcs11:token=my_token;id=my_id?pin-value=the-pin
start_type automatic
If I delete the configuration with the local listener, Mosquitto starts and opens a listener on port 1883, even though no listener is configured on that port.
I'm afraid that those options both only apply to listeners, and they are part of the older set of options that will create an implicit default listener if one isn't already defined. I suspect you've put your bridge config before the listener - had you put the listener first the tls_* options would have been applied to that listener.