[JAVA-4739] Condition to check for crypt shared library is incorrect Created: 27/Sep/22  Updated: 28/Oct/23  Resolved: 29/Sep/22

Status: Closed
Project: Java Driver
Component/s: Client Side Encryption
Affects Version/s: None
Fix Version/s: 4.7.2

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

See this and [this|https://github.com/mongodb/mongo-java-driver/blob/b9251622747231e05d6b1736a06fe45e03f642e5/driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/internal/crypt/CommandMarker.java#L70.

It should be:

boolean cryptSharedIsAvailable = cryptSharedLibVersionString != null && !cryptSharedLibVersionString.isEmpty()

Consider also how to add at least unit test coverage since there are currently no tests for this.



 Comments   
Comment by Githook User [ 29/Sep/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix check for whether crypt shared lib is available

Also add unit tests for isMongocryptdSpawningDisabled helper method

JAVA-4739
Branch: 4.7.x
https://github.com/mongodb/mongo-java-driver/commit/7c1451c315750fe1ccbfdcf28d59482ba4c591c9

Comment by Githook User [ 29/Sep/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Extract method for duplicated logic checking for whether mongocryptd is disabled

JAVA-4739
Branch: 4.7.x
https://github.com/mongodb/mongo-java-driver/commit/7ea1f207ebaaa720487cd7e76db9f448ce8e29ee

Comment by Githook User [ 29/Sep/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix check for whether crypt shared lib is available

Also add unit tests for isMongocryptdSpawningDisabled helper method

JAVA-4739
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/aa5ad827cc32e9a23e9a9d3ebaf25671836febb6

Comment by Githook User [ 29/Sep/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Extract method for duplicated logic checking for whether mongocryptd is disabled

JAVA-4739
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/102a5ae08aaa5e667158b05b5ed3fa0cb56a3b24

Generated at Thu Feb 08 09:02:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.