MONGOC_CLIENT_SET_SSL_OPTS(3) | MongoDB C Driver | MONGOC_CLIENT_SET_SSL_OPTS(3) |
mongoc_client_set_ssl_opts - mongoc_client_set_ssl_opts()
#ifdef MONGOC_ENABLE_SSL void mongoc_client_set_ssl_opts (mongoc_client_t *client,
const mongoc_ssl_opt_t *opts); #endif
Sets the SSL options to use when connecting to SSL enabled MongoDB servers.
The mongoc_ssl_opt_t struct is copied by the client along with the strings it points to (pem_file, pem_pwd, ca_file, ca_dir, and crl_file) so they don't have to remain valid after the call to mongoc_client_set_ssl_opts.
A call to mongoc_client_set_ssl_opts overrides all SSL options set through the connection string with which the mongoc_client_t was constructed.
It is a programming error to call this function on a client from a mongoc_client_pool_t. Instead, call mongoc_client_pool_set_ssl_opts on the pool before popping any clients.
This feature requires that the MongoDB C driver was compiled with -DENABLE_SSL.
MongoDB, Inc
2017-present, MongoDB, Inc
February 23, 2019 | 1.14.0 |