[CXX-1614] Client constructed with independently defined SSL options always crashes Created: 23/Jul/18  Updated: 28/Oct/23  Resolved: 26/Jul/18

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: 3.3.0
Fix Version/s: 3.3.1

Type: Bug Priority: Critical - P2
Reporter: Evgeni Dobranov Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The client constructor in mongocxx/client.cpp with the uri and options arguments always crashes if options has SSL options defined.

This is because _impl is not initialized by the time the SSL options are set via libmongoc::client_set_ssl_opts, so _get_impl() will always throw an exception.

We should move the SSL checks to below where the new client is initialized in the constructor, and possibly write tests to test this constructor.



 Comments   
Comment by Githook User [ 26/Jul/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CXX-1614 Fix crash setting client SSL options
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/0c775243c61b5ad03f1c581dd8b85eb4bf5b8cd7

Generated at Wed Feb 07 22:03:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.