Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS-PSK support not available #565

Closed
ghost opened this issue Sep 27, 2017 · 1 comment
Closed

TLS-PSK support not available #565

ghost opened this issue Sep 27, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 27, 2017

Hello,

I've been trying to setup a bridge network with PSK encryption, and I'm getting the following warning from the Mosquitto server being connected to:
Warning: TLS/TLS-PSK support not available.

And the following warning from the client in the bridge network:
Warning: Bridge and/or TLS-PSK support not available.

I'm running the brokers in Docker, building on the latest Alpine version, installing from apk using mosquitto=1.4.12-r0. I can get the bridge to work when not using PSK, and when using password file based authentication.

On the client-broker I have the following bridge related entries in the config file:

connection bridge-to-main-host
address mqtt-two:8883
topic direct-observations/# out 1
topic control-signals/# in 1
bridge_insecure false
bridge_identity bridge1
bridge_psk 123456789

On the broker that accepts bridge connections I have the following bridge related settings:

listener 8883
protocol mqtt
psk_hint usingkey
psk_file /mosquitto/config/psk.file

And the contents of the psk_file is:

bridge1:123456789

I'm not sure if the error messages mean that I have set up PSK badly, or if the support refers to the build/openssl versions on Alpine. I tried renaming the PSK file, but not updating the config with the new file ID to see if I get a different error, but this didn't lead to any new errors, I then double checked the files/names and they do seem to match up (when I haven't tried to make them not match).

Strangely, after some time, the bridge does connect, but gives no other feedback about the use of PSK/encryption:

mqtt-one_1  | Warning: Bridge and/or TLS-PSK support not available.
mqtt-one_1  | Warning: Bridge and/or TLS-PSK support not available.
mqtt-one_1  | 1506520192: mosquitto version 1.4.12 (build date 2017-06-01 13:03:46+0000) starting
mqtt-one_1  | 1506520192: Config loaded from /mosquitto/config/mosquitto.conf.
mqtt-one_1  | 1506520192: Opening ipv4 listen socket on port 1883.
mqtt-one_1  | 1506520192: Opening ipv6 listen socket on port 1883.
mqtt-one_1  | 1506520192: Connecting bridge bridge-to-main-host (mqtt-two:8883)
mqtt-two_1  | Warning: store_clean_interval is no longer needed.
mqtt-two_1  | Warning: TLS/TLS-PSK support not available.
mqtt-two_1  | Warning: TLS/TLS-PSK support not available.
mqtt-two_1  | 1506520191: mosquitto version 1.4.12 (build date 2017-06-01 13:03:46+0000) starting
mqtt-two_1  | 1506520191: Config loaded from /mosquitto/config/mosquitto.conf.
mqtt-two_1  | 1506520191: Opening ipv4 listen socket on port 8883.
mqtt-two_1  | 1506520191: Opening ipv6 listen socket on port 8883.
mqtt-two_1  | 1506520191: Opening ipv4 listen socket on port 1883.
mqtt-two_1  | 1506520191: Opening ipv6 listen socket on port 1883.
mqtt-two_1  | 1506520192: New connection from 172.21.0.3 on port 8883.
mqtt-two_1  | 1506520192: Client arduino-logger-a disconnected.
mqtt-two_1  | 1506520192: New client connected from 172.21.0.3 as arduino-logger-a (c0, k60, u'arduino-user').
mqtt-two_1  | 1506520222: Saving in-memory database to /mosquitto/data/mosquitto.db.

Any help appreciated, and I can provide any information needed, I only put the above as I didn't think the whole config file was necessary, but can add gists to them and the dockerfile/compose file if they help.

Thanks

@PierreF
Copy link
Contributor

PierreF commented Jan 4, 2018

Message "Warning: FEATURE_X support not available" means that the support was not included during Mosquitto build. In this case Mosquitto simply ignore configuration directive that require this build option, that's why you bridge are able to connect (but no PSK checks is done).

You will need to build Mosquitto with WITH_TLS_PSK:=yes in config.mk (this is the default on Mosquitto, but Alpine linux disable it)

@PierreF PierreF closed this as completed Jan 4, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant