Building with -DENABLE_SSL=OPENSSL and referring to a non-existing CA path results in an assertion failure. Example:
mongoc_client_t *client = mongoc_client_new ("mongodb://bob:pwd123@localhost:27017/?tls=true&tlsCAFile=/nonexistant/ca.pem"); ASSERT (!mongoc_client_command_simple (client, "admin", tmp_bson ("{'ping': 1}"), NULL, NULL, NULL)); mongoc_client_destroy (client);
Results in an assertion failure:
2024/09/25 10:14:38.0138: [4096262]: ERROR: mongoc: Cannot load Certificate Authorities from '/nonexistant/ca.pem' and '(null)' The parameter: ssl_ctx, in function mongoc_stream_tls_openssl_new_with_context, cannot be NULL
Quoting ezra.chung@mongodb.com:
This seems to be a regression introduced in 1.28.0 by this commit. 1.27.6 does not exhibit this assertion failure.