1MONGOC_CLIENT_SET_SSL_OPTS(3) libmongoc MONGOC_CLIENT_SET_SSL_OPTS(3)
2
3
4
6 #ifdef MONGOC_ENABLE_SSL
7 void
8 mongoc_client_set_ssl_opts (mongoc_client_t *client,
9 const mongoc_ssl_opt_t *opts);
10 #endif
11
12 Sets the TLS (SSL) options to use when connecting to TLS enabled Mon‐
13 goDB servers.
14
15 The mongoc_ssl_opt_t struct is copied by the client along with the
16 strings it points to (pem_file, pem_pwd, ca_file, ca_dir, and crl_file)
17 so they don't have to remain valid after the call to mon‐
18 goc_client_set_ssl_opts.
19
20 A call to mongoc_client_set_ssl_opts overrides all TLS options set
21 through the connection string with which the mongoc_client_t was con‐
22 structed.
23
24 It is a programming error to call this function on a client from a
25 mongoc_client_pool_t. Instead, call mongoc_client_pool_set_ssl_opts()
26 on the pool before popping any clients.
27
29 • client: A mongoc_client_t.
30
31 • opts: A mongoc_ssl_opt_t.
32
34 This feature requires that the MongoDB C driver was compiled with -DEN‐
35 ABLE_SSL.
36
38 MongoDB, Inc
39
41 2017-present, MongoDB, Inc
42
43
44
45
461.25.1 Nov 08, 2023 MONGOC_CLIENT_SET_SSL_OPTS(3)