[CDRIVER-4450] Initializing client-side encryption spawns mongocryptd even if crypt_shared is available and loaded Created: 03/Aug/22  Updated: 28/Oct/23  Resolved: 03/Aug/22

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.23.0

Type: Bug Priority: Unknown
Reporter: Colby Pike Assignee: Colby Pike
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-4414 Allow applications and wrapping drive... Closed

 Description   

Summary

When initializing client-side encryption, if the user has not explicitly disabled the spawning of mongocryptd as part of the CSE options, libmongoc will attempt to spawn mongocryptd. If crypt_shared is loaded, libmongoc does not required mongocryptd to perform query analysis, and should not spawn it.

How to Reproduce

If CSE options are set such that mongocryptd would be spawned by libmongoc in the absence of crypt_shared, libmongoc will attempt to spawn mongocryptd regardless of whether crypt_shared is available and loaded.

Additional Background

The specification modifications for the addition of the crypt_shared library as part of encryption mandates that mongocryptd must not be spawned if libmongocrypt reports successfully loaded crypt_shared. The guard for this condition is missing from _mongoc_crypt_new.



 Comments   
Comment by Colby Pike [ 03/Aug/22 ]

Drive-by fixed in https://github.com/mongodb/mongo-c-driver/pull/1083

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