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

Any news about SSL support mqtts? #37

Open
bkrajendra opened this issue Feb 23, 2018 · 4 comments
Open

Any news about SSL support mqtts? #37

bkrajendra opened this issue Feb 23, 2018 · 4 comments

Comments

@bkrajendra
Copy link

Any news about SSL support mqtts?

@bkrajendra
Copy link
Author

SSL is working fine with me without any major change.
i made some change in cordova-plugin-mqtt.js
Just change url to
url:"ssl://mqtt.iocarehost.com"
Aso uncommented :
var urgx = /(^(tcp|ssl|local)&?:\/\/[^\@_?!]+[^\s]+[^\.]+\:\d{2,})/g;
Also changed line no 110 to

                if (args.url.split("ssl://").length > 1) {
                    client = new Paho.MQTT.Client(args.url.split("ssl://")[1], Number(args.wsPort), args.urlPath||"/ws", args.clientId);
                }

as i only need ssl to work. It might be needed to check ssl option here and accordingly set connect function.

@praveen1207
Copy link

How to add certificate can you show the working code

@bkrajendra
Copy link
Author

Im not using any client side certificate. My mqtt broker only need u to specify that connection is . No need to provide any client certificate. Most broker are same way. try it.

@adrianmihaila
Copy link

@arcoirislabs any news about ssl support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants