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

Support for ALPN in Mosquitto #924

Closed
santoshks68 opened this issue Aug 19, 2018 · 5 comments
Closed

Support for ALPN in Mosquitto #924

santoshks68 opened this issue Aug 19, 2018 · 5 comments
Labels
Type: Enhancement A new feature for a minor or major release.
Milestone

Comments

@santoshks68
Copy link

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!

@toast-uz toast-uz added the Type: Enhancement A new feature for a minor or major release. label Aug 19, 2018
@toast-uz
Copy link
Contributor

Supporting ALPN is useful for not only the client but also the bridge of mosquitto.

@ralight ralight added this to the 1.6 milestone Aug 19, 2018
@ralight
Copy link
Contributor

ralight commented Aug 19, 2018

Sounds like a sensible request.

@rOY369
Copy link

rOY369 commented Aug 31, 2018

Any update on ALPN support for Mosquitto bridging and otherwise as well ?

@santoshks68
Copy link
Author

Is there a time frame when this enhancement will be made available? Basically, is there any timeline for milestone 1.6?

@ralight
Copy link
Contributor

ralight commented Apr 16, 2019

This is fixed in 1.6, which will be released tomorrow.

@ralight ralight closed this as completed Apr 16, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Enhancement A new feature for a minor or major release.
Projects
None yet
Development

No branches or pull requests

4 participants