Skip to content
Prev Previous commit
Next Next commit
add tls options
  • Loading branch information
blink1073 committed Aug 11, 2022
commit 035fbf2c0946ab06cd50a0529e88dd508c489b2f
9 changes: 9 additions & 0 deletions test/test_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -2224,6 +2224,13 @@ class TestRewrapWithSeparateClientEncryption(EncryptionIntegrationTest):
"local": {},
}

KMS_TLS_OPTS = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the tlsCAFile is only valid/needed for kmip. Can we use the existing KMS_TLS_OPTS global instead of adding a new self.KMS_TLS_OPTS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"aws": {"tlsCAFile": CA_PEM},
"azure": {"tlsCAFile": CA_PEM},
"gcp": {"tlsCAFile": CA_PEM},
"kmip": {"tlsCAFile": CA_PEM},
}

def test_rewrap(self):
for src_provider in self.MASTER_KEYS:
for dst_provider in self.MASTER_KEYS:
Expand All @@ -2239,6 +2246,7 @@ def run_test(self, src_provider, dst_provider):
key_vault_client=self.client,
key_vault_namespace="keyvault.datakeys",
kms_providers=ALL_KMS_PROVIDERS,
kms_tls_options=self.KMS_TLS_OPTS,
codec_options=OPTS,
)
self.addCleanup(client_encryption1.close)
Expand All @@ -2260,6 +2268,7 @@ def run_test(self, src_provider, dst_provider):
key_vault_client=client2,
key_vault_namespace="keyvault.datakeys",
kms_providers=ALL_KMS_PROVIDERS,
kms_tls_options=self.KMS_TLS_OPTS,
codec_options=OPTS,
)
self.addCleanup(client_encryption1.close)
Expand Down