mongoc_auto_encryption_opts_set_extra()¶
Synopsis¶
void
mongoc_auto_encryption_opts_set_extra (mongoc_auto_encryption_opts_t *opts,
const bson_t *extra);
Parameters¶
opts
: The mongoc_auto_encryption_opts_textra
: Abson_t
of additional options.
extra
is a bson_t
containing any of the following optional fields:
mongocryptdURI
set to a URI to connect to the mongocryptd process (default is “mongodb://localhost:27020”).mongocryptdBypassSpawn
set to true to prevent the driver from spawning the mongocryptd process (default behavior is to spawn).mongocryptdSpawnPath
set to a path (with trailing slash) to search for mongocryptd (defaults to empty string and uses default system paths).mongocryptdSpawnArgs
set to an array of string arguments to pass tomongocryptd
when spawning (defaults to[ "--idleShutdownTimeoutSecs=60" ]
).cryptSharedLibPath
- Set a filepath string referring to acrypt_shared
library file. Unset by default.If not set (the default),
libmongocrypt
will attempt to loadcrypt_shared
using the host system’s default dynamic-library-search system.If set, the given path should identify the
crypt_shared
dynamic library file itself, not the directory that contains it.If the given path is a relative path and the first path component is
$ORIGIN
, the$ORIGIN
component will be replaced with the absolute path to the directory containing thelibmongocrypt
library in use by the application.Note
No other
RPATH
/RUNPATH
-style substitutions are available.If the given path is a relative path, the path will be resolved relative to the working directory of the operating system process.
If this option is set and
libmongocrypt
fails to loadcrypt_shared
from the given filepath,libmongocrypt
will fail to initialize and will not attempt to search forcrypt_shared
in any other locations.
cryptSharedLibRequired
- If set totrue
, andlibmongocrypt
fails to load acrypt_shared
library, initialization of auto-encryption will fail immediately and will not attempt to spawnmongocryptd
.If set to
false
(the default),cryptSharedLibPath
is not set, andlibmongocrypt
fails to loadcrypt_shared
, thenlibmongocrypt
will proceed withoutcrypt_shared
and fall back to usingmongocryptd
.
See also
crypt_shared
: Automatic Encryption Shared Librarymongocryptd
: Install and Configure mongocryptd