Function mongocrypt_sys::mongocrypt_ctx_provide_kms_providers

source ยท
pub unsafe extern "C" fn mongocrypt_ctx_provide_kms_providers(
    ctx: *mut mongocrypt_ctx_t,
    kms_providers_definition: *mut mongocrypt_binary_t,
) -> bool
Expand description

Call in response to the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS state to set per-context KMS provider settings. These follow the same format as @ref mongocrypt_setopt_kms_providers. If no keys are present in the BSON input, the KMS provider settings configured for the @ref mongocrypt_t at initialization are used.

@param[in] ctx The @ref mongocrypt_ctx_t object. @param[in] kms_providers_definition A BSON document mapping the KMS provider names to credentials.

@returns A boolean indicating success. If false, an error status is set. Retrieve it with @ref mongocrypt_ctx_status.