Details
-
Bug
-
Resolution: Done
-
Critical - P2
-
None
-
None
Description
Even when compiling libmongoc with SSL support, compiling the C++ driver and running code using SSL features fails.
To reproduce:
- Compile/install libmongoc with SSL support
- Compile the C++ driver as usual
- Compile and run the following code:
#include <bsoncxx/builder/basic/document.hpp>
|
#include <bsoncxx/builder/basic/kvp.hpp>
|
#include <bsoncxx/document/value.hpp>
|
#include <bsoncxx/json.hpp>
|
#include <iostream>
|
#include <mongocxx/client.hpp>
|
#include <mongocxx/database.hpp>
|
#include <mongocxx/instance.hpp>
|
#include <mongocxx/uri.hpp>
|
#include <mongocxx/uri.hpp>
|
|
|
using namespace mongocxx; |
using namespace bsoncxx::builder::basic; |
|
|
int main() { |
mongocxx::instance instance{};
|
|
|
document builder{};
|
builder.append(kvp("_isSelf", 1)); |
bsoncxx::document::value is_self = builder.extract();
|
|
|
{
|
client client{uri{"mongodb://snitest1.10gen.cc:27777/?ssl=true"}}; |
database db = client["test"]; |
std::cout << "First output: " |
<< bsoncxx::to_json(db.run_command(is_self.view())) << std::endl;
|
}
|
|
|
{
|
client client{uri{"mongodb://snitest2.mongodb.com:27777/?ssl=true"}}; |
database db = client["test"]; |
bsoncxx::document::value output = db.run_command(is_self.view());
|
|
|
std::cout << "Second output: " << bsoncxx::to_json(output) << std::endl; |
}
|
}
|
The output will be something like this:
libc++abi.dylib: terminating with uncaught exception of type mongocxx::v_noabi::exception: SSL support not available
|