问题
I am using mosquitto broker server. I have enabled ssl as instructed here: http://www.steves-internet-guide.com/mosquitto-tls/
But this is self signed certificate. I have only read about adding ssl to websites. How do I add ssl to a mosquitto server so that it can be accessed from sites on https.
Should I buy a certificate from a CA and then follow the steps given in the link?
I don't know how I would add ssl to a server
回答1:
Assuming you want your site to be used be anybody and not just browsers you have direct control over (where you could add your own CA to the trusted list).
You will need to obtain a certificate signed by a trusted CA (this could be a purchased one or from a provider like LetsEncrypt) so the browser will allow the connection to complete.
The browsers will not prompt a user to accept a untrusted (e.g. self signed) certificate for a websocket connection as it does for loading a webpage.
Once you have a trusted certificate then you will need to follow the instructions specific to the broker you are using to configure it to use the certificate.
来源:https://stackoverflow.com/questions/59412971/how-to-sign-ssl-on-server