@@ -260,6 +260,7 @@ def _parse_version(version):
260260 MONGOCRYPT_LOG_LEVEL_ERROR = 1,
261261 MONGOCRYPT_LOG_LEVEL_WARNING = 2,
262262 MONGOCRYPT_LOG_LEVEL_INFO = 3,
263+ MONGOCRYPT_LOG_LEVEL_TRACE = 4
263264} mongocrypt_log_level_t;
264265
265266/**
@@ -1133,7 +1134,24 @@ def _parse_version(version):
11331134bool mongocrypt_kms_ctx_feed(mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes);
11341135
11351136/**
1136- * Indicate a network-level failure.
1137+ * Feed bytes from the KMS response.
1138+ *
1139+ * Feeding more bytes than what has been returned in @ref
1140+ * mongocrypt_kms_ctx_bytes_needed is an error.
1141+ *
1142+ * @param[in] kms The @ref mongocrypt_kms_ctx_t.
1143+ * @param[in] bytes The bytes to feed. The viewed data is copied. It is valid to
1144+ * destroy @p bytes with @ref mongocrypt_binary_destroy immediately after.
1145+ * @param[out] should_retry Whether the KMS request should be retried. Retry in-place
1146+ * without calling @ref mongocrypt_kms_ctx_fail.
1147+ * @returns A boolean indicating success. If false, an error status is set.
1148+ * Retrieve it with @ref mongocrypt_kms_ctx_status
1149+ */
1150+ bool mongocrypt_kms_ctx_feed_with_retry(mongocrypt_kms_ctx_t *kms, mongocrypt_binary_t *bytes, bool *should_retry);
1151+
1152+ /**
1153+ * Indicate a network error. Discards all data fed to this KMS context with @ref mongocrypt_kms_ctx_feed.
1154+ * The @ref mongocrypt_kms_ctx_t may be reused.
11371155 *
11381156 * @param[in] kms The @ref mongocrypt_kms_ctx_t.
11391157 * @return A boolean indicating whether the failed request may be retried.
0 commit comments