Provided by: libmongoc-doc_1.26.0-1.1ubuntu2_all bug

CONFIGURATION WITH URI OPTIONS

       Enable TLS by including tls=true in the URI.

          mongoc_uri_t *uri = mongoc_uri_new ("mongodb://localhost:27017/");
          mongoc_uri_set_option_as_bool (uri, MONGOC_URI_TLS, true);

          mongoc_client_t *client = mongoc_client_new_from_uri (uri);

       The following URI options may be used to further configure TLS:
┌─────────────────────────────────────────────────┬──────────────────────────────────────┬────────────────────────────────────────┐
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
├─────────────────────────────────────────────────┼──────────────────────────────────────┼────────────────────────────────────────┤
└─────────────────────────────────────────────────┴──────────────────────────────────────┴────────────────────────────────────────┘

CONFIGURATION WITH MONGOC_SSL_OPT_T

       Alternatively, the mongoc_ssl_opt_t struct may be used to configure TLS with mongoc_client_set_ssl_opts()
       or  mongoc_client_pool_set_ssl_opts().  Most  of the configurable options can be set using the Connection
       String URI.
                             ────────────────────────────────────────────────────────────
                               mongoc_ssl_opt_t key     URI key
                             ────────────────────────────────────────────────────────────
                               pem_file                 tlsClientCertificateKeyFile
                             ────────────────────────────────────────────────────────────
                               pem_pwd                  tlsClientCertificateKeyPassword
                             ────────────────────────────────────────────────────────────
                               ca_file                  tlsCAFile
                             ────────────────────────────────────────────────────────────
                               weak_cert_validation     tlsAllowInvalidCertificates
                             ────────────────────────────────────────────────────────────
                               allow_invalid_hostname   tlsAllowInvalidHostnames
                             ┌────────────────────────┬─────────────────────────────────┐
                             │                        │                                 │
--
CLIENT AUTHENTICATION        │                        │                                 │
--
--
SUPPORTED LIBRARIES          │                        │                                 │
--

AUTHOR

       MongoDB, Inc

COPYRIGHT

       2017-present, MongoDB, Inc

1.26.0                                            Mar 31, 2024                         MONGOC_CONFIGURING_TLS(3)