ext/libmongocrypt/libmongocrypt/integrating.md in libmongocrypt-helper-1.11.0.0.1001 vs ext/libmongocrypt/libmongocrypt/integrating.md in libmongocrypt-helper-1.12.0.0.1001
- old
+ new
@@ -61,11 +61,11 @@
## Part 2: Integrate into Driver ##
After you have a binding, integrate libmongocrypt in your driver to
support client side encryption.
-See the [driver spec](https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst)
+See the [driver spec](https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.md)
for a reference of the user-facing API. libmongocrypt is needed for:
- Automatic encryption/decryption
- Explicit encryption/decryption
- KeyVault (explicit encryption/decryption + createDataKey)
@@ -201,23 +201,30 @@
1. Iterate all KMS requests using `mongocrypt_ctx_next_kms_ctx`.
(Note, the driver MAY fan out all HTTP requests at the same time).
2. For each context:
- a. Create/reuse a TLS socket connected to the endpoint indicated by
+ a. Delay the message by the time in microseconds indicated by
+ `mongocrypt_kms_ctx_usleep` if returned value is greater than 0.
+
+ b. Create/reuse a TLS socket connected to the endpoint indicated by
`mongocrypt_kms_ctx_endpoint`. The endpoint string is a host name with
a port number separated by a colon. E.g.
"kms.us-east-1.amazonaws.com:443". A port number will always be
included. Drivers may assume the host name is not an IP address or IP
literal.
- b. Write the message from `mongocrypt_kms_ctx_message` to the
+ c. Write the message from `mongocrypt_kms_ctx_message` to the
> socket.
- c. Feed the reply back with `mongocrypt_kms_ctx_feed`. Repeat
+ d. Feed the reply back with `mongocrypt_kms_ctx_feed`. Repeat
> until `mongocrypt_kms_ctx_bytes_needed` returns 0.
+ If any step encounters a network error, continue to the next KMS context if
+ `mongocrypt_kms_ctx_fail` returns true. Otherwise, abort and report an
+ error.
+
3. When done feeding all replies, call `mongocrypt_ctx_kms_done`.
**Applies to...**
All contexts.
@@ -234,10 +241,10 @@
Credentials for one or more KMS providers.
**Driver needs to...**
-Fetch credentials for supported KMS providers. See the [Client Side Encryption specification](https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#automatic-credentials) for details.
+Fetch credentials for supported KMS providers. See the [Client Side Encryption specification](https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.md#automatic-credentials) for details.
Pass credentials to libmongocrypt using `mongocrypt_ctx_provide_kms_providers`.
**Applies to...**