Scroll to navigation

MONGOC_CLIENT_SET_SSL_OPTS(3) Library Functions Manual MONGOC_CLIENT_SET_SSL_OPTS(3)

NAME

mongoc_client_set_ssl_opts() - None

SYNOPSIS


#ifdef MONGOC_ENABLE_SSL 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.

Beginning in version 1.2.0, once a client has any SSL options set, all connections use SSL, even if ssl=true is omitted from the MongoDB URI. Before, SSL options were ignored unless ssl=true was included in the URI.

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

It is a programming error to call this function on a client from a mongoc_client_pool_t mongoc_client_pool_set_ssl_opts on the pool before popping any clients.

PARAMETERS

client
A mongoc_client_t
opts
A mongoc_ssl_opt_t

AVAILABILITY

This feature requires that the MongoDB C driver was compiled with --enable-ssl

COLOPHON

This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
2016‐10‐12 MongoDB C Driver