---
name: "mongoc_client_pool_set_ssl_opts"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_client_pool_set_ssl_opts"
---

# mongoc\_client\_pool\_set\_ssl\_opts(3)

## SYNOPSIS

```
#ifdef MONGOC_ENABLE_SSL
void
mongoc_client_pool_set_ssl_opts (mongoc_client_pool_t *pool,
                                 const mongoc_ssl_opt_t *opts);
#endif
```

**NOTE:**

Though some API names include the term "ssl", the C driver only support TLS protocols, which supersede SSL.

This function is identical to *mongoc\_client\_set\_ssl\_opts()* except for client pools. It ensures that all clients retrieved from *mongoc\_client\_pool\_pop()* or *mongoc\_client\_pool\_try\_pop()* are configured with the same TLS settings.

The *mongoc\_ssl\_opt\_t* struct is copied by the pool 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\_pool\_set\_ssl\_opts()*.

A call to *mongoc\_client\_pool\_set\_ssl\_opts()* overrides all TLS options set through the connection string with which the *mongoc\_client\_pool\_t* was constructed.

## PARAMETERS

- •

  **pool**: A *mongoc\_client\_pool\_t*.

- •

  **opts**: A *mongoc\_ssl\_opt\_t*.

## THREAD SAFETY

This function can only be called once on a pool, and must be called before the first call to *mongoc\_client\_pool\_pop()*.

## AVAILABILITY

This feature requires that the MongoDB C driver was compiled with **-DENABLE\_SSL**.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
