mongoc_uri_get_tls does not consider the MONGOC_URI_TLSINSECURE and MONGOC_URI_TLSCERTIFICATEKEYFILEPASSWORD constants. This was likely an oversight in the PR for CDRIVER-2869.
The Unified URI options spec leaves the decision to each driver to implicitly enable TLS if any related options are specified. The C driver has historically done so (even for the "insecure" options like ignoring certs), so it should be a quick fix to add these two options to the list of those considered.
The docs for mongoc_uri_get_tls can also be improved to clarify that the function returns true if any TLS option is specified.
- is related to
-
CDRIVER-3369 mongoc_uri_get_tls case-sensitivity is inconsistent with other option functions
- Closed
-
PHPC-1446 Always enable TLS when any TLS option is specified
- Closed
-
CDRIVER-2869 Implement Unified URI Options
- Closed