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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: legacy-0.0-26compat-2.6.3
    • Component/s: Documentation
    • Environment:
      RH linux 64bit, MONGODB Enterpise version.
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

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

              Created:
              Updated:
              Resolved: