Skip to content

Commit 98dba64

Browse files
committed
MONGOCRYPT-864 do not load crypt_shared in ClientEncryption
1 parent 1e78bd4 commit 98dba64

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

pymongo/asynchronous/encryption.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,12 @@ def __init__(
714714
self._io_callbacks: Optional[_EncryptionIO] = _EncryptionIO(
715715
None, key_vault_coll, None, opts
716716
)
717+
718+
# Pass bypass_encryption=True to skip loading crypt_shared.
717719
self._encryption = AsyncExplicitEncrypter(
718720
self._io_callbacks,
719721
_create_mongocrypt_options(
720-
kms_providers=kms_providers, schema_map=None, key_expiration_ms=key_expiration_ms
722+
kms_providers=kms_providers, schema_map=None, key_expiration_ms=key_expiration_ms, bypass_encryption=True
721723
),
722724
)
723725
# Use the same key vault collection as the callback.

pymongo/synchronous/encryption.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,10 +707,15 @@ def __init__(
707707
self._io_callbacks: Optional[_EncryptionIO] = _EncryptionIO(
708708
None, key_vault_coll, None, opts
709709
)
710+
711+
# Pass bypass_encryption=True to skip loading crypt_shared.
710712
self._encryption = ExplicitEncrypter(
711713
self._io_callbacks,
712714
_create_mongocrypt_options(
713-
kms_providers=kms_providers, schema_map=None, key_expiration_ms=key_expiration_ms
715+
kms_providers=kms_providers,
716+
schema_map=None,
717+
key_expiration_ms=key_expiration_ms,
718+
bypass_encryption=True,
714719
),
715720
)
716721
# Use the same key vault collection as the callback.

0 commit comments

Comments
 (0)