-
Notifications
You must be signed in to change notification settings - Fork 15
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 / TLS Implementation #1
Comments
I work on this project on and off, mainly during spare time, it should be easy enough of an addition, that's why I prioritized more inner-logic features, anyway PRs are welcome. |
Can you give some idea on how to add the ssl/tls functionality ?? |
I suppose the easiest way is to incrementally add it by using
|
|
You can see a rough work I started on ab112b7. Just some simple changes on reception parts on the server module, and accept of course.
|
I have create certificates for my broker using openssl command like below and Mentioned Below line in conf file but while connecting from MQTT Client its showing Droping client at server side. Not able to connect. |
I am getting connected message for my client Id but Client shows continuously connection error SSL_get_error(client->ssl,r) returns Error 2 Which I think it means error with certificates |
Im facing the same issue. Were you able to resolve it ? |
I start the server by making ssl=true and port=8883 it gives the error as follow... |
For this you have to add two entries in .conf file as below |
I am trying but no success; if you resolved then do let me know your solution |
i add the certs in config file still i am getting same error. such as.. |
Is certificate.pem file present at location /home/pi ? |
Now getting this permission error as follow.. |
Try by running using sudo rights |
Thank you for your help.Now server is start without any error, but the on that port can't listen anything .i start the server but on that port not listen anything |
I tried running the same command sudo lsof -n -P -i | grep LISTEN |
which command you use to start the broker. |
./sol -c /home/user/Desktop/mqttbroker/sol-master/conf/sol.conf |
I am using the same command still port is not listen anything. |
Any error after running command ? |
Here i attach my config file. |
Have you configured same configuration in conf folder /sol.conf file ? |
no it's not load the configuration parameter. when i start the server it look like as ... |
Can you share me your /sol.conf file . |
Socket family: Unix this option is in default .conf file. |
for my reference can you share your config file. |
ip_address 192.168.1.15 |
thank you. now server start with the config parameter.but when i try to connect it server print msg dropping client . |
I am also on the same boat....Still trying to figure out whats wrong. If you found any solution do let me know. |
you having same issue |
Yes |
ok. if i find any solution i let you know. |
Working on it. It's something the client doesn't like about self-signed certs I think. As of now the connection is correctly established by setting import ssl
import paho.mqtt.client as mqtt
client = mqtt.Client('ssl-test')
client.tls_set(certfile='cert.pem', keyfile='key.pem', tls_version=ssl.PROTOCOL_SSLv23, cert_reqs=ssl.CERT_NONE)
client.connect('127.0.0.1', 1883) I think the correct way to make it work is to first generate a CA, then generate certificates signed with that CA, this way the server will correctly provide signed certificates expected by the client with the same CA set. |
This is probably the best way to go as most other MQTT brokers use this method. |
Still i am facing the " Dropping client" error.. |
Hello, |
please update how to work ssl with this mqtt server. |
I am facing the same issue with ssl. Anyone find the solution for work ssl . |
Is there any update on ssl. |
I pushed some updates, as of now TLS should work, but expect some bugs. $ mosquitto_sub -v -p 1234 -t test --cafile certs/ca.crt --cert certs/cert.crt --key certs/cert.key and $ mosquitto_pub -t test -m hello -p 1234 --cafile certs/ca.crt --cert certs/cert.crt --key certs/cert.key Cya. |
I tried to test with above command it gives the error as: |
The sol server can't accept the client certificate. With client side add client certificate it gives the error. |
I was facing the same thing. But it worked perfectly using MQTT Box in CA Server self signed certificate mode. Apparently if you configure the client to accept the certificate from the broker, rather than pointing the crt files to the client manually, it works perfectly. |
Thx for the feedbacks, I'll investigate these curious cases during holidays. |
I was trying with this command given as follow |
Still i am facing the issue with ssl. I can't work with ssl. |
I trying to connect with the broker with ssl client cert it gives the error: |
I have problem in password.py file.The password .py having the error during the run time. |
Is there any update on SSL / TLS implementation ?
The text was updated successfully, but these errors were encountered: