@@ -575,6 +575,8 @@ MongoCrypt::MongoCrypt(const CallbackInfo& info) : ObjectWrap(info) {
575
575
576
576
mongocrypt_setopt_use_need_kms_credentials_state (mongo_crypt ());
577
577
578
+ mongocrypt_setopt_retry_kms (mongo_crypt (), true );
579
+
578
580
// Initialize after all options are set.
579
581
if (!mongocrypt_init (mongo_crypt ())) {
580
582
throw TypeError::New (Env (), errorStringFromStatus (mongo_crypt ()));
@@ -947,6 +949,8 @@ Function MongoCryptKMSRequest::Init(Napi::Env env) {
947
949
{InstanceMethod (" addResponse" , &MongoCryptKMSRequest::AddResponse),
948
950
InstanceAccessor (" status" , &MongoCryptKMSRequest::Status, nullptr ),
949
951
InstanceAccessor (" bytesNeeded" , &MongoCryptKMSRequest::BytesNeeded, nullptr ),
952
+ InstanceAccessor (" uSleep" , &MongoCryptKMSRequest::USleep, nullptr ),
953
+ InstanceAccessor (" fail" , &MongoCryptKMSRequest::Fail, nullptr ),
950
954
InstanceAccessor (" kmsProvider" , &MongoCryptKMSRequest::KMSProvider, nullptr ),
951
955
InstanceAccessor (" endpoint" , &MongoCryptKMSRequest::Endpoint, nullptr ),
952
956
InstanceAccessor (" message" , &MongoCryptKMSRequest::Message, nullptr )});
@@ -977,6 +981,14 @@ Value MongoCryptKMSRequest::BytesNeeded(const CallbackInfo& info) {
977
981
return Number::New (Env (), mongocrypt_kms_ctx_bytes_needed (_kms_context));
978
982
}
979
983
984
+ Value MongoCryptKMSRequest::USleep (const CallbackInfo& info) {
985
+ return Number::New (Env (), mongocrypt_kms_ctx_usleep (_kms_context));
986
+ }
987
+
988
+ Value MongoCryptKMSRequest::Fail (const CallbackInfo& info) {
989
+ return Boolean::New (Env (), mongocrypt_kms_ctx_fail (_kms_context));
990
+ }
991
+
980
992
Value MongoCryptKMSRequest::KMSProvider (const CallbackInfo& info) {
981
993
return String::New (Env (), mongocrypt_kms_ctx_get_kms_provider (_kms_context, nullptr ));
982
994
}
0 commit comments