-
Notifications
You must be signed in to change notification settings - Fork 226
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
ssl support #10
Comments
Mosquitto does support TLS but I've not yet added it to MQTTKit. I have a branch (https://github.com/jmesnil/MQTTKit/tree/TLS_support) for this feature but it's not completed yet |
Hi Jeff I do need the open SSL Version. Do you know of any other Kit that does the TLS or could you help me write the wrapper for mosquitto_tls_set. Our broker uses open ssl and port 8884. Thanks in advance, |
@smzarrin, I'm currently adding TLS support to MQTTKit in this branch https://github.com/jmesnil/MQTTKit/tree/TLS_support but have not thoroughly tested it. If you could try it and confirm that it works for you, I may merge it in upstream. |
The reason I started my own https://github.com/ckrey/MQTT-Client-Framework was the fact that a year ago there was no SSL support in MQTTKit. MQTT-Client-Framework supports TLS, MQTT spec 3.1.1 and is the base for @owntracks (http://owntracks.org) and MQTTInspector apps. Both apps are quite stable. For MQTTInspector I added some low level delegate methods too. MQTT-Client-Framework is fully native Objective-C and builds on Apple's CFNetwork layer. Let me know when your SSL support is finished. |
MQTTKit did not exist one year ago ;) @ckrey What are the main differences between your lib and 2lemetry/eclipse pano Obj-c client? |
MQTT-Client-Framework started as a fork of m2mIO/mqttIO-objC (the predecessor of the Obj-c client under eclipse). At that time there were problems with ARC support, SSL was not visible on the public interface, etc. So, I started off to go independently - now there are the following differences although the core code is still 2lemetry:
I hope we will find a way to bring Objective-C MQTT libraries together again and profit from wider use, testing, and contributions... |
@jmesnil How do you feel using OpenSSL on IOS (footprint, complexity, stability)? |
@jmesnil Hello Jeff, I am using MQTTKit for a messaging app. My broker uses SSL connection. So I am searching for SSL support in the MQTTKit. I checked out your code and new branch (https://github.com/jmesnil/MQTTKit/tree/TLS_support) for TLS_support as mentioned above. However I don't find any method that implements SSL connection with certificates. Can you please let me know if the branch has SSL support implementation or not? Or let me know if i didn't knew how to use it. Thanks |
@mysticboy59 You can specify a CA file on the MQTT client (as it is done in the test https://github.com/jmesnil/MQTTKit/blob/TLS_support/MQTTKitTests/MQTTKitTests.m#L227). Note that this branch is a proof of concept. I am not sure whether it is a good idea to rely on OpenSSL for TLS given the recent issues with it. |
@jmesnil Hello Jeff, seems the TLS_support branch could not be compiled correctly, cause the WITH_TLS not defined. |
Worked perfectly with |
I am using https://github.com/jmesnil/MQTTKit/blob/TLS_support/MQTTKitTests/MQTTKitTests.m#L227). |
|
@GuriSarao @kirang89 I forked @jmesnil 's repo and finished the TLS_support branch, just for testing my project. My codes are not good enough for production, you should consummate that codes before use in an online app I think. :) |
@zwf I tried adding |
Hi can you please send me your working source code as i am already stuck in this from last 2 week and can't get any solution yet. My email is is gursewaks104@gmail.com. I will be very thankful to you. |
@GuriSarao Checkout @zwf 's fork. It works fine for me. |
@viteinfinite Did you have issues with |
I am getting same error with @zwf fork when i define WITH_TLS.there are lots of error come in my code when i define WITH_TLS. can anyone have solution? |
@GuriSarao You don't have to define anything. Just add |
@GuriSarao just follow @kirang89 's comment :) thx @kirang89
|
@zwf I keep getting |
@kirang89 I didn't face this. I guess the issue brought by async part in MQTTKit. |
My thoughts exactly. I raised it as an issue (#31). |
Hi. Will there be a chance that the branch will get merged to master original repo? Thanks. |
bump |
bump because this is a great feature! |
bump because this is a great feature![2] |
@kirang89 / @zwf Im also trying to integrate zwf's implementation. But facing some issues in connecting to the server. Im trying to connect to a mqtt server with verisign signed cert. What are the parameter i need to set in the client. Tried setting tlsInsecure to false and also set PEM encoded cert for the cafile. nothing seems to work am i missing something? Need help badly. |
I just used @zwf's fork and got it to work well. I had to setup MQTT with TLS for work, but I ended up using a non-TLS implementation because of threading issues. Unfortunately I don't have any project that I can share but I'll try and highlight a few key things I did:
|
Is it possible to use @zwf's fork without a username and password? I'm using the AWS IoT MQTT broker and it doesn't support username/password credentials. It will only accept a CA file and certificates. |
Does the Objective-C implementation of the mosquito lib support TLS connections?
The text was updated successfully, but these errors were encountered: