MONGOC_CLIENT_POOL_SET_SSL_OPTS(3)
β¨ MONGOC_CLIENT_POOL_SET_SSL_OPTS(3) β¨
okay so this is a page from the libmongoc manual, bestie π and it's all about setting your TLS options on a whole entire client pool at once. no cap, it's a glow-up for every client in the pool at the same time β¨
πΈ 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: bestie, listen β even though some API names literally have the word "ssl" in them, the C driver only supports TLS protocols, which supersede SSL. so like, "ssl" in the name is giving legacy aesthetic, but it's TLS under the hood π
π¦ DESCRIPTION π¦
This function is literally identical to mongoc_client_set_ssl_opts() except it's for client pools instead of a single client. same energy, different scope π«Ά
It makes sure that every single client you pull out of mongoc_client_pool_pop() or mongoc_client_pool_try_pop() is configured with the exact same TLS settings. no stragglers, no rogue vibes, everybody matching. main character consistency π
The mongoc_ssl_opt_t struct gets copied by the pool β and so do all the strings it points to (pem_file, pem_pwd, ca_file, ca_dir, and crl_file). so those don't have to stay valid after you call mongoc_client_pool_set_ssl_opts(). you can let them go, they've served their purpose, we love a clean break πβ¨
Calling mongoc_client_pool_set_ssl_opts() overrides all TLS options that were set through the connection string you used to construct the mongoc_client_pool_t. yep, all of them. this call is the moment, it takes over π
π PARAMETERS π
poolβ amongoc_client_pool_t. the pool in question, your little client farm πoptsβ amongoc_ssl_opt_t. all your TLS settings, bundled up cute π
π THREAD SAFETY π
π This function can only be called once on a pool, and it must be called before the first call to mongoc_client_pool_pop().
so likeβ¦ once. before the popping. that's the rule. periodt π
β AVAILABILITY β
This feature requires that the MongoDB C driver was compiled with -DENABLE_SSL. no flag, no function, iykyk π₯
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's the whole page, bestie π this lovely little number comes to you from libmongoc version 2.5.6, dated Oct 09, 2021 β catch you in the next manual page, muah π«Άβ¨π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms