Skip to content

Conversation

@kevinAlbs
Copy link
Collaborator

@kevinAlbs kevinAlbs commented Oct 8, 2024

Follow-up to #1750 to fix failing Windows tasks.

The Windows hosts appear to have the expected CA file installed:

PS C:\Users\Administrator> Get-ChildItem -Recurse Cert:
(...)
Subject      : C=US, S=New York, L=New York City, O=MongoDB, OU=Drivers, CN=Drivers Testing CA

So no error is returned for the test.

Verified with this patch build.

{
mongoc_client_t *client = mongoc_client_new ("mongodb://localhost:27017/?tls=true&tlsCAFile=/nonexistant/ca.pem");
ASSERT (!mongoc_client_command_simple (client, "admin", tmp_bson ("{'ping': 1}"), NULL, NULL, NULL));
mongoc_client_command_simple (client, "admin", tmp_bson ("{'ping': 1}"), NULL, NULL, NULL);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this fail even if the Windows has the cert file? If the tlsCAFile names a non-existent file, then do we really want to fall back to the Windows cert store? And if so, should it fail anyway since the user is explicitly requesting a non-existing CA cert?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That may be a worthwhile later improvement. But at present, failure to load the CA file logs but does not propagate the error.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed CDRIVER-5747 to propose propagating TLS set-up errors. To unblock the 1.28.1 release, I would rather keep the behavior as-is for now (no worse than the status quo).

Copy link
Contributor

@vector-of-bool vector-of-bool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevinAlbs kevinAlbs merged commit b6d64e5 into mongodb:master Oct 8, 2024
kevinAlbs added a commit that referenced this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants