libmongocrypt
Loading...
Searching...
No Matches
mongocrypt.h
Go to the documentation of this file.
1/*
2 * Copyright 2019-present MongoDB, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef MONGOCRYPT_H
17#define MONGOCRYPT_H
18
20
25
26#include "mongocrypt-compat.h"
27#include "mongocrypt-export.h"
28
29/* clang-format off */
30#ifndef __has_include
31 #include "mongocrypt-config.h"
32#else
33 #if __has_include("mongocrypt-config.h")
34 #include "mongocrypt-config.h"
35 #else
36 #error No "mongocrypt-config.h" header is available. That file must \
37 be generated in order to use libmongocrypt.
38 #endif
39#endif
40/* clang-format on */
41
48MONGOCRYPT_EXPORT
49const char *mongocrypt_version(uint32_t *len);
50
59MONGOCRYPT_EXPORT
61
87typedef struct _mongocrypt_binary_t {
88 void *data;
89 uint32_t len;
91
99MONGOCRYPT_EXPORT
101
111MONGOCRYPT_EXPORT
113
121MONGOCRYPT_EXPORT
123
131MONGOCRYPT_EXPORT
133
141MONGOCRYPT_EXPORT
143
152typedef struct _mongocrypt_status_t mongocrypt_status_t;
153
157typedef enum {
158 MONGOCRYPT_STATUS_OK = 0,
159 MONGOCRYPT_STATUS_ERROR_CLIENT = 1,
160 MONGOCRYPT_STATUS_ERROR_KMS = 2,
161 MONGOCRYPT_STATUS_ERROR_CRYPT_SHARED = 3,
163
173MONGOCRYPT_EXPORT
175
192MONGOCRYPT_EXPORT
195 uint32_t code,
196 const char *message,
197 int32_t message_len);
198
206MONGOCRYPT_EXPORT
208
216MONGOCRYPT_EXPORT
218
228MONGOCRYPT_EXPORT
229const char *mongocrypt_status_message(mongocrypt_status_t *status, uint32_t *len);
230
239MONGOCRYPT_EXPORT
241
247MONGOCRYPT_EXPORT
249
253typedef enum {
254 MONGOCRYPT_LOG_LEVEL_FATAL = 0,
255 MONGOCRYPT_LOG_LEVEL_ERROR = 1,
256 MONGOCRYPT_LOG_LEVEL_WARNING = 2,
257 MONGOCRYPT_LOG_LEVEL_INFO = 3,
258 MONGOCRYPT_LOG_LEVEL_TRACE = 4
260
270typedef void (*mongocrypt_log_fn_t)(mongocrypt_log_level_t level, const char *message, uint32_t message_len, void *ctx);
271
284typedef struct _mongocrypt_t mongocrypt_t;
285
295MONGOCRYPT_EXPORT
297
310MONGOCRYPT_EXPORT
312
322MONGOCRYPT_EXPORT
324
346MONGOCRYPT_EXPORT
348 const char *aws_access_key_id,
349 int32_t aws_access_key_id_len,
350 const char *aws_secret_access_key,
351 int32_t aws_secret_access_key_len);
352
367MONGOCRYPT_EXPORT
369
381MONGOCRYPT_EXPORT
383
396MONGOCRYPT_EXPORT
398
411MONGOCRYPT_EXPORT
413
442MONGOCRYPT_EXPORT
444
468MONGOCRYPT_EXPORT
470
485MONGOCRYPT_EXPORT
487
497MONGOCRYPT_EXPORT
499
513MONGOCRYPT_EXPORT
515
525MONGOCRYPT_EXPORT
527
533MONGOCRYPT_EXPORT
535
554MONGOCRYPT_EXPORT
555const char *mongocrypt_crypt_shared_lib_version_string(const mongocrypt_t *crypt, uint32_t *len);
556
576MONGOCRYPT_EXPORT
578
582typedef struct _mongocrypt_ctx_t mongocrypt_ctx_t;
583
593MONGOCRYPT_EXPORT
595
607MONGOCRYPT_EXPORT
609
624MONGOCRYPT_EXPORT
626
649MONGOCRYPT_EXPORT
651
667MONGOCRYPT_EXPORT
669
690MONGOCRYPT_EXPORT
691bool mongocrypt_ctx_setopt_algorithm(mongocrypt_ctx_t *ctx, const char *algorithm, int len);
692
694#define MONGOCRYPT_ALGORITHM_DETERMINISTIC_STR "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
696#define MONGOCRYPT_ALGORITHM_RANDOM_STR "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
698#define MONGOCRYPT_ALGORITHM_INDEXED_STR "Indexed"
700#define MONGOCRYPT_ALGORITHM_UNINDEXED_STR "Unindexed"
701// DEPRECATED: support "RangePreview" has been removed in favor of "range".
702#define MONGOCRYPT_ALGORITHM_RANGEPREVIEW_DEPRECATED_STR "RangePreview"
703#define MONGOCRYPT_ALGORITHM_RANGE_STR "Range"
704
723MONGOCRYPT_EXPORT
725 const char *region,
726 int32_t region_len,
727 const char *cmk,
728 int32_t cmk_len);
729
747MONGOCRYPT_EXPORT
748bool mongocrypt_ctx_setopt_masterkey_aws_endpoint(mongocrypt_ctx_t *ctx, const char *endpoint, int32_t endpoint_len);
749
760MONGOCRYPT_EXPORT
762
814MONGOCRYPT_EXPORT
816
831MONGOCRYPT_EXPORT
833
848MONGOCRYPT_EXPORT
849bool mongocrypt_ctx_encrypt_init(mongocrypt_ctx_t *ctx, const char *db, int32_t db_len, mongocrypt_binary_t *cmd);
850
886MONGOCRYPT_EXPORT
888
931MONGOCRYPT_EXPORT
933
947MONGOCRYPT_EXPORT
949
963MONGOCRYPT_EXPORT
965
978MONGOCRYPT_EXPORT
980
987typedef enum {
988 MONGOCRYPT_CTX_ERROR = 0,
989 MONGOCRYPT_CTX_NEED_MONGO_COLLINFO = 1, /* run on main MongoClient */
990 MONGOCRYPT_CTX_NEED_MONGO_COLLINFO_WITH_DB = 8, /* run on main MongoClient */
991 MONGOCRYPT_CTX_NEED_MONGO_MARKINGS = 2, /* run on mongocryptd. */
992 MONGOCRYPT_CTX_NEED_MONGO_KEYS = 3, /* run on key vault */
993 MONGOCRYPT_CTX_NEED_KMS = 4,
994 MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS = 7, /* fetch/renew KMS credentials */
995 MONGOCRYPT_CTX_READY = 5, /* ready for encryption/decryption */
996 MONGOCRYPT_CTX_DONE = 6,
998
1005MONGOCRYPT_EXPORT
1007
1028MONGOCRYPT_EXPORT
1030
1044MONGOCRYPT_EXPORT
1046
1069MONGOCRYPT_EXPORT
1071
1079MONGOCRYPT_EXPORT
1081
1085typedef struct _mongocrypt_kms_ctx_t mongocrypt_kms_ctx_t;
1086
1102MONGOCRYPT_EXPORT
1104
1118MONGOCRYPT_EXPORT
1120
1135MONGOCRYPT_EXPORT
1136bool mongocrypt_kms_ctx_endpoint(mongocrypt_kms_ctx_t *kms, const char **endpoint);
1137
1144MONGOCRYPT_EXPORT
1146
1153MONGOCRYPT_EXPORT
1155
1168MONGOCRYPT_EXPORT
1170
1177MONGOCRYPT_EXPORT
1179
1188MONGOCRYPT_EXPORT
1190
1206MONGOCRYPT_EXPORT
1208
1217MONGOCRYPT_EXPORT
1219
1234MONGOCRYPT_EXPORT
1236
1273MONGOCRYPT_EXPORT
1275
1281MONGOCRYPT_EXPORT
1283
1301typedef bool (*mongocrypt_crypto_fn)(void *ctx,
1306 uint32_t *bytes_written,
1307 mongocrypt_status_t *status);
1308
1326typedef bool (*mongocrypt_hmac_fn)(void *ctx,
1330 mongocrypt_status_t *status);
1331
1345typedef bool (*mongocrypt_hash_fn)(void *ctx,
1348 mongocrypt_status_t *status);
1349
1363typedef bool (*mongocrypt_random_fn)(void *ctx, mongocrypt_binary_t *out, uint32_t count, mongocrypt_status_t *status);
1364
1365MONGOCRYPT_EXPORT
1366bool mongocrypt_setopt_crypto_hooks(mongocrypt_t *crypt,
1367 mongocrypt_crypto_fn aes_256_cbc_encrypt,
1368 mongocrypt_crypto_fn aes_256_cbc_decrypt,
1369 mongocrypt_random_fn random,
1370 mongocrypt_hmac_fn hmac_sha_512,
1371 mongocrypt_hmac_fn hmac_sha_256,
1372 mongocrypt_hash_fn sha_256,
1373 void *ctx);
1374
1389MONGOCRYPT_EXPORT
1391 mongocrypt_crypto_fn aes_256_ctr_encrypt,
1392 mongocrypt_crypto_fn aes_256_ctr_decrypt,
1393 void *ctx);
1394
1409MONGOCRYPT_EXPORT
1410bool mongocrypt_setopt_aes_256_ecb(mongocrypt_t *crypt, mongocrypt_crypto_fn aes_256_ecb_encrypt, void *ctx);
1411
1429MONGOCRYPT_EXPORT
1431 mongocrypt_hmac_fn sign_rsaes_pkcs1_v1_5,
1432 void *sign_ctx);
1433
1443MONGOCRYPT_EXPORT
1445
1454MONGOCRYPT_EXPORT
1456
1467MONGOCRYPT_EXPORT
1468bool mongocrypt_ctx_setopt_contention_factor(mongocrypt_ctx_t *ctx, int64_t contention_factor);
1469
1485MONGOCRYPT_EXPORT
1487
1498MONGOCRYPT_EXPORT
1499bool mongocrypt_ctx_setopt_query_type(mongocrypt_ctx_t *ctx, const char *query_type, int len);
1500
1519MONGOCRYPT_EXPORT
1521
1529MONGOCRYPT_EXPORT
1530bool mongocrypt_setopt_key_expiration(mongocrypt_t *crypt, uint64_t cache_expiration_ms);
1531
1533#define MONGOCRYPT_QUERY_TYPE_EQUALITY_STR "equality"
1534// DEPRECATED: Support "rangePreview" has been removed in favor of "range".
1535#define MONGOCRYPT_QUERY_TYPE_RANGEPREVIEW_DEPRECATED_STR "rangePreview"
1536#define MONGOCRYPT_QUERY_TYPE_RANGE_STR "range"
1537
1538#endif /* MONGOCRYPT_H */
MONGOCRYPT_EXPORT void mongocrypt_status_set(mongocrypt_status_t *status, mongocrypt_status_type_t type, uint32_t code, const char *message, int32_t message_len)
MONGOCRYPT_EXPORT mongocrypt_binary_t * mongocrypt_binary_new(void)
struct _mongocrypt_kms_ctx_t mongocrypt_kms_ctx_t
Definition mongocrypt.h:1085
MONGOCRYPT_EXPORT uint32_t mongocrypt_binary_len(const mongocrypt_binary_t *binary)
MONGOCRYPT_EXPORT const char * mongocrypt_kms_ctx_get_kms_provider(mongocrypt_kms_ctx_t *kms, uint32_t *len)
MONGOCRYPT_EXPORT bool mongocrypt_status(mongocrypt_t *crypt, mongocrypt_status_t *status)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_algorithm_range(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *opts)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_key_id(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_id)
MONGOCRYPT_EXPORT const char * mongocrypt_version(uint32_t *len)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_index_key_id(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_id)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_key_material(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_material)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_kms_provider_aws(mongocrypt_t *crypt, const char *aws_access_key_id, int32_t aws_access_key_id_len, const char *aws_secret_access_key, int32_t aws_secret_access_key_len)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_decrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *doc)
MONGOCRYPT_EXPORT void mongocrypt_setopt_use_need_kms_credentials_state(mongocrypt_t *crypt)
Opt-into handling the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state.
MONGOCRYPT_EXPORT bool mongocrypt_kms_ctx_status(mongocrypt_kms_ctx_t *kms, mongocrypt_status_t *status)
MONGOCRYPT_EXPORT void mongocrypt_setopt_use_need_mongo_collinfo_with_db_state(mongocrypt_t *crypt)
Opt-into handling the MONGOCRYPT_CTX_NEED_MONGO_COLLINFO_WITH_DB state.
MONGOCRYPT_EXPORT bool mongocrypt_kms_ctx_fail(mongocrypt_kms_ctx_t *kms)
MONGOCRYPT_EXPORT const char * mongocrypt_crypt_shared_lib_version_string(const mongocrypt_t *crypt, uint32_t *len)
bool(* mongocrypt_crypto_fn)(void *ctx, mongocrypt_binary_t *key, mongocrypt_binary_t *iv, mongocrypt_binary_t *in, mongocrypt_binary_t *out, uint32_t *bytes_written, mongocrypt_status_t *status)
Definition mongocrypt.h:1301
MONGOCRYPT_EXPORT mongocrypt_status_type_t mongocrypt_status_type(mongocrypt_status_t *status)
MONGOCRYPT_EXPORT bool mongocrypt_is_crypto_available(void)
MONGOCRYPT_EXPORT int64_t mongocrypt_kms_ctx_usleep(mongocrypt_kms_ctx_t *kms)
MONGOCRYPT_EXPORT void mongocrypt_ctx_destroy(mongocrypt_ctx_t *ctx)
MONGOCRYPT_EXPORT void mongocrypt_binary_destroy(mongocrypt_binary_t *binary)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_encrypted_field_config_map(mongocrypt_t *crypt, mongocrypt_binary_t *efc_map)
mongocrypt_status_type_t
Definition mongocrypt.h:157
mongocrypt_log_level_t
Definition mongocrypt.h:253
MONGOCRYPT_EXPORT bool mongocrypt_init(mongocrypt_t *crypt)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_contention_factor(mongocrypt_ctx_t *ctx, int64_t contention_factor)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_encrypt_init(mongocrypt_ctx_t *ctx, const char *db, int32_t db_len, mongocrypt_binary_t *cmd)
MONGOCRYPT_EXPORT mongocrypt_ctx_t * mongocrypt_ctx_new(mongocrypt_t *crypt)
struct _mongocrypt_ctx_t mongocrypt_ctx_t
Definition mongocrypt.h:582
MONGOCRYPT_EXPORT bool mongocrypt_setopt_use_range_v2(mongocrypt_t *crypt)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_masterkey_local(mongocrypt_ctx_t *ctx)
MONGOCRYPT_EXPORT uint32_t mongocrypt_kms_ctx_bytes_needed(mongocrypt_kms_ctx_t *kms)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_kms_providers(mongocrypt_t *crypt, mongocrypt_binary_t *kms_providers)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_log_handler(mongocrypt_t *crypt, mongocrypt_log_fn_t log_fn, void *log_ctx)
struct _mongocrypt_binary_t mongocrypt_binary_t
MONGOCRYPT_EXPORT bool mongocrypt_ctx_rewrap_many_datakey_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *filter)
Initialize a context to rewrap datakeys.
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_masterkey_aws(mongocrypt_ctx_t *ctx, const char *region, int32_t region_len, const char *cmk, int32_t cmk_len)
MONGOCRYPT_EXPORT void mongocrypt_destroy(mongocrypt_t *crypt)
MONGOCRYPT_EXPORT uint32_t mongocrypt_status_code(mongocrypt_status_t *status)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_explicit_decrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_crypto_hook_sign_rsaes_pkcs1_v1_5(mongocrypt_t *crypt, mongocrypt_hmac_fn sign_rsaes_pkcs1_v1_5, void *sign_ctx)
MONGOCRYPT_EXPORT uint64_t mongocrypt_crypt_shared_lib_version(const mongocrypt_t *crypt)
Obtain a 64-bit constant encoding the version of the loaded crypt_shared library, if available.
MONGOCRYPT_EXPORT bool mongocrypt_ctx_kms_done(mongocrypt_ctx_t *ctx)
bool(* mongocrypt_hash_fn)(void *ctx, mongocrypt_binary_t *in, mongocrypt_binary_t *out, mongocrypt_status_t *status)
Definition mongocrypt.h:1345
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_key_encryption_key(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *bin)
bool(* mongocrypt_random_fn)(void *ctx, mongocrypt_binary_t *out, uint32_t count, mongocrypt_status_t *status)
Definition mongocrypt.h:1363
MONGOCRYPT_EXPORT mongocrypt_ctx_state_t mongocrypt_ctx_state(mongocrypt_ctx_t *ctx)
MONGOCRYPT_EXPORT bool mongocrypt_kms_ctx_message(mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *msg)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_mongo_feed(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *reply)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_provide_kms_providers(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *kms_providers_definition)
MONGOCRYPT_EXPORT const char * mongocrypt_status_message(mongocrypt_status_t *status, uint32_t *len)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_datakey_init(mongocrypt_ctx_t *ctx)
MONGOCRYPT_EXPORT bool mongocrypt_kms_ctx_feed(mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes)
MONGOCRYPT_EXPORT void mongocrypt_setopt_append_crypt_shared_lib_search_path(mongocrypt_t *crypt, const char *path)
Append an additional search directory to the search path for loading the crypt_shared dynamic library...
MONGOCRYPT_EXPORT bool mongocrypt_status_ok(mongocrypt_status_t *status)
mongocrypt_ctx_state_t
Definition mongocrypt.h:987
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_masterkey_aws_endpoint(mongocrypt_ctx_t *ctx, const char *endpoint, int32_t endpoint_len)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_aes_256_ctr(mongocrypt_t *crypt, mongocrypt_crypto_fn aes_256_ctr_encrypt, mongocrypt_crypto_fn aes_256_ctr_decrypt, void *ctx)
MONGOCRYPT_EXPORT bool mongocrypt_kms_ctx_endpoint(mongocrypt_kms_ctx_t *kms, const char **endpoint)
MONGOCRYPT_EXPORT uint8_t * mongocrypt_binary_data(const mongocrypt_binary_t *binary)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_query_type(mongocrypt_ctx_t *ctx, const char *query_type, int len)
struct _mongocrypt_t mongocrypt_t
Definition mongocrypt.h:284
MONGOCRYPT_EXPORT bool mongocrypt_ctx_finalize(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *out)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_kms_provider_local(mongocrypt_t *crypt, mongocrypt_binary_t *key)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_key_expiration(mongocrypt_t *crypt, uint64_t cache_expiration_ms)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_retry_kms(mongocrypt_t *crypt, bool enable)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_aes_256_ecb(mongocrypt_t *crypt, mongocrypt_crypto_fn aes_256_ecb_encrypt, void *ctx)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_algorithm(mongocrypt_ctx_t *ctx, const char *algorithm, int len)
void(* mongocrypt_log_fn_t)(mongocrypt_log_level_t level, const char *message, uint32_t message_len, void *ctx)
Definition mongocrypt.h:270
MONGOCRYPT_EXPORT mongocrypt_t * mongocrypt_new(void)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_explicit_encrypt_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg)
MONGOCRYPT_EXPORT mongocrypt_status_t * mongocrypt_status_new(void)
MONGOCRYPT_EXPORT void mongocrypt_setopt_set_crypt_shared_lib_path_override(mongocrypt_t *crypt, const char *path)
Set a single override path for loading the crypt_shared dynamic library.
MONGOCRYPT_EXPORT mongocrypt_binary_t * mongocrypt_binary_new_from_data(uint8_t *data, uint32_t len)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_explicit_encrypt_expression_init(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *msg)
MONGOCRYPT_EXPORT bool mongocrypt_setopt_schema_map(mongocrypt_t *crypt, mongocrypt_binary_t *schema_map)
MONGOCRYPT_EXPORT void mongocrypt_setopt_bypass_query_analysis(mongocrypt_t *crypt)
Opt-into skipping query analysis.
MONGOCRYPT_EXPORT bool mongocrypt_ctx_mongo_done(mongocrypt_ctx_t *ctx)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_status(mongocrypt_ctx_t *ctx, mongocrypt_status_t *status)
MONGOCRYPT_EXPORT bool mongocrypt_ctx_setopt_key_alt_name(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *key_alt_name)
MONGOCRYPT_EXPORT void mongocrypt_status_destroy(mongocrypt_status_t *status)
bool(* mongocrypt_hmac_fn)(void *ctx, mongocrypt_binary_t *key, mongocrypt_binary_t *in, mongocrypt_binary_t *out, mongocrypt_status_t *status)
Definition mongocrypt.h:1326
struct _mongocrypt_status_t mongocrypt_status_t
Definition mongocrypt.h:152
MONGOCRYPT_EXPORT bool mongocrypt_ctx_mongo_op(mongocrypt_ctx_t *ctx, mongocrypt_binary_t *op_bson)
MONGOCRYPT_EXPORT mongocrypt_kms_ctx_t * mongocrypt_ctx_next_kms_ctx(mongocrypt_ctx_t *ctx)
MONGOCRYPT_EXPORT const char * mongocrypt_ctx_mongo_db(mongocrypt_ctx_t *ctx)
Definition mongocrypt.h:87