Closed zentechlinhnguyen closed 6 years ago
Since Erlang does not come with a CA trust store, you're going to want to add one in order for server certificate verification to work. You can put a file with the root CA used by your server in your project's priv
directory, or add the certifi package as a dependency, then configure Tortoise like this:
server: {
Tortoise.Transport.SSL,
host: mqtt_server,
port: mqtt_port,
cacertfile: :certifi.cacertfile()
}
Alternatively, for testing purposes, you can disable server certificate verification by passing verify: :verify_none
in the server options. In that case there is no need for CA certificates, but you don't get the protections against impersonation or MitM attacks.
I updated the README file with these instructions in #65
@zentechlinhnguyen does the additions to the documentation in #65 answer your question ?
Closing this issue; it seems inactive.
The
Tortoise.Transport.SSL
transport will take an opts field, and its default opts is@default_opts [verify: :verify_peer]
.The transport uses the Erlang
:ssl
module, please refer to the documentation for and user guide in the Erlang documentation: