Fix TLS issues for PyMongo 4.0 (#885)
Fix TLS issues for PyMongo 4.0 (#885)

* Remove `tls_cert_reqs` from opts for pymongo connection

There is no such parameter in pymongo.

* Set the `tlsAllowInvalidCertificates` pymongo opt to `True`, not `ssl.CERT_OPTIONAL`

The driver requires this to be `True` or `False`.

* If the CLI param is passed, set `tlsAllowInvalidHostnames` to `True`, not `False`

* Pass in TLS args to mongod and mongos

These args were being entirely ignored when constructing the command line
options.

* Fix handling of TLS client certs

When constructing params for the pymongo connection, the key names are
`tlsCertificate*`, not `tlsClientCertificate*`.

In addition, there's no `tlsCertificate` option. There's only
`tlsCertificateKeyFile`, which must contain the key _and_ cert. Because of
that, I removed the `--tlsClientCertificate` CLI option.
rueckstiess/mtools,rueckstiess/mtools