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
Support for ALPN in Mosquitto #924
Labels
Type: Enhancement
A new feature for a minor or major release.
Milestone
Comments
Supporting ALPN is useful for not only the client but also the bridge of mosquitto. |
Sounds like a sensible request. |
Any update on ALPN support for Mosquitto bridging and otherwise as well ? |
Closed
Is there a time frame when this enhancement will be made available? Basically, is there any timeline for milestone 1.6? |
6 tasks
This is fixed in 1.6, which will be released tomorrow. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
To connect to AWS IOT Broker on port 443, one needs to specify the ALPN protocol for AWS i.e. “x-amzn-mqtt-ca”. Since currently there is no direct way to do this using the Mosquitto API client library, one needs to instantiate a SSL_CTX object instead of relying on the one Mosquitto internally creates. With this SSL_CTX it is possible to set the ALPN protocol using the OpenSSL API, SSL_CTX_set_alpn_protos. Once this is done, the Mosquitto client instance is initialized with this SS_CTX object using opts_set(mosq_opt_t::MOSQ_OPT_SSL_CTX, ...). This works. The problem is during reconnect , this bit of jugglery is not accounted for and hence reconnect fails. It would be a good feature to enable setting the ALPN protocol at the Mosquitto API which would in turn make it simpler to handle the reconnect scenarios. The alternative would be to consider that a developer might need to provide his own SSL_CTX object (for whatever reasons) and since Mosquitto does allow you to do so, it should also consider this during reconnect!
The text was updated successfully, but these errors were encountered: