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

Issue with connecting via certificates version 2.0.17 #2897

Open
hbibani opened this issue Sep 19, 2023 · 0 comments
Open

Issue with connecting via certificates version 2.0.17 #2897

hbibani opened this issue Sep 19, 2023 · 0 comments

Comments

@hbibani
Copy link

hbibani commented Sep 19, 2023

The version of mosquitto is 2.0.17 and am using windows

I'm following this blog to create the certificates:

http:https://www.steves-internet-guide.com/mosquitto-tls/

openssl genrsa -des3 -out ca.key 2048
openssl req -new -x509 -days 1826 -key ca.key -out ca.crt
openssl genrsa -out server.key 2048
openssl req -new -out server.csr -key server.key
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 360

I changes the listener to:

listener 8883

and added the following lines:

cafile c:/certificates/ca.crt
keyfile c:/certificates/server.key
certfile c:/certificates/server.crt
tls_version tlsv1.2

And when I use the following windows equivalent

C:\mos>mosquitto_pub -h 192.168.1.41 -p 8883 -t test -m test --cafile c:/python34/steve/mqtt-demos/ca.crt --tls-version tlsv1.2

It says protocol error

And when I use mqtt explorer it says not authorized

Don't know what I'm doing wrong.

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

1 participant