Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-323

connect to the mongodb database over SSL using C++ driver and certificate

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • legacy-0.0-26compat-2.6.3
    • Documentation
    • RH linux 64bit, MONGODB Enterpise version.

    Description

      The only example we have so far is

      Configuration of the driver is managed through a new class, added in the legacy-0.9.0 release, called Options. This class is hosted in the mongo::client namespace, and is defined in the header mongo/client/options.h.
      Passing an instance to mongo::client::initialize
      By default, calling mongo::client::initialize() with no parameters is equivalent to calling mongo::client::initialize(mongo::client::Options()) passing a default constructed mongo::client::Options object.
      Because the mongo::client::Options class has setters returning a mongo::client::Options& you can chain together options to easily configure them at the call site:
      using mongo::client::initialize;
      using mongo::client::Options;

      // Configure the mongo C++ client driver, enabling SSL and setting
      // the SSL Certificate Authority file to "mycafile".
      Status status = initialize(
      Options().setSSLMode(Options:kSSLModeRequired).setSSLCAFile("mycafile")
      );

      And this complains that mongo/client/options.h is not found.

      Please provide example of how similar thing can be done with mongo-cxx-driver-legacy-0.0-26compat-2.6.3

      Attachments

        Activity

          People

            Unassigned Unassigned
            DN Dharmaraj Narayan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: