Closed marcelbuesing closed 3 years ago
Your code seems correct, so I've merged it.
rustls errors can be a little hard to track down. Can you add some example client certificates that seem to cause a problem? That would help us reproduce the issue.
So issues I ran into were basically when following this guide that openssl generates x.509 version 1 certificates which are not supported by rustls. Next I ran into issues with self signed certificates. I just created this client / server example.
I haven't had time to look at your example yet, but one way I have had success is by using the scripts included in the rustls tree.
Add parameters for TLS client authentication.
Notice, this may lead to the following error:
mqtt_async_client::client::client] IoTask: Error connecting: invalid certificate: BadDER
. Not sure if this is related to my cert setup yet or a general rustls issue, similar issue is described here, dirty workaround here.