You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Multitask/mqtt_broker_setup.txt
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ TLS mutual authentication for use with this MQTT demo.
4
4
a. Download and install [Git For Windows](https://git-scm.com/download/win).
5
5
Most of you may already have this installed. Git For Windows provides an
6
6
OpenSSL binary for generating certificates.
7
-
b. Open PowerShell and enter the following commands to generate TLS certificates:
7
+
b. Open PowerShell and enter the following commands to generate TLS certificates [Note: While creating the certificates make sure to not use same organization name for all the certificates to prevent "self-signed certificate" error.]:
8
8
i. cd "C:\Program Files\Git\usr\bin" # If Git is installed elsewhere, update the path.
ix. [Optional] .\openssl.exe verify -CAfile $home\Documents\certs\ca.crt $home\Documents\certs\server.crt # verify the server certificate is correctly signed
17
+
x. [Optional] .\openssl.exe verify -CAfile $home\Documents\certs\ca.crt $home\Documents\certs\client.crt # verify the client certificate is correctly signed
16
18
2. Download Mosquitto from https://mosquitto.org/download/
17
19
3. Install Mosquitto as a Windows service by running the installer.
18
20
4. Go to the path where Mosquitto was installed. The default path is C:\Program Files\mosquitto.
19
-
5. Update mosquitto.conf to have the following entries and don't forget to substitute your Windows username:
20
-
port 8883
21
+
5. Update mosquitto.conf to have the following entries and don't forget to substitute your Windows username [Mosquitto Version 2.0.0 onwards]:
22
+
listener 8883
21
23
cafile C:\Users\%Substitute Windows username%\Documents\certs\ca.crt
22
24
certfile C:\Users\%Substitute Windows username%\Documents\certs\server.crt
23
25
keyfile C:\Users\%Substitute Windows username%\Documents\certs\server.key
24
26
require_certificate true
25
27
tls_version tlsv1.2
28
+
allow_anonymous true
26
29
6. Start the Mosquitto service.
27
30
More details about running Mosquitto as a Windows service can be found at
28
31
https://github.com/eclipse/mosquitto/blob/master/readme-windows.txt and
0 commit comments