[CDRIVER-3428] Implicitly enable TLS for tlsInsecure and tlsCertificateKeyFilePassword URI opts Created: 06/Nov/19  Updated: 28/Oct/23  Resolved: 16/Dec/19

Status: Closed
Project: C Driver
Component/s: tls, uri
Affects Version/s: 1.15.0
Fix Version/s: 1.15.3

Type: Bug Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-3369 mongoc_uri_get_tls case-sensitivity i... Closed
is related to PHPC-1446 Always enable TLS when any TLS option... Closed
is related to CDRIVER-2869 Implement Unified URI Options Closed
Backwards Compatibility: Minor Change

 Description   

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.



 Comments   
Comment by Githook User [ 16/Dec/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3428 enable TLS for any TLS options

tlsInsecure and tlsCertificateKeyFilePassword were missing.
Branch: r1.15
https://github.com/mongodb/mongo-c-driver/commit/941137491748535862ba6beb36214080e03aa3c7

Comment by Githook User [ 16/Dec/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3428 enable TLS for any TLS options

tlsInsecure and tlsCertificateKeyFilePassword were missing.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0997aad00c42f8c0501cdaba3a6201c67bef3423

Comment by Jeremy Mikola [ 06/Nov/19 ]

Cross-referencing with CDRIVER-3369, as that also has implications for how case-insensitive variants of these two options will be used.

Generated at Wed Feb 07 21:18:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.