Unable to connect to MongoDB using SSL/TLS

Did you try --tlsAllowInvalidCertificates & --tlsAllowInvalidHostnames .
Not recommended but just to test

Check these links for localhost certs generation

https://www.selfsignedcertificate.com/