From 38fec645f863dd8a36dc9fe29abab3188a46ab79 Mon Sep 17 00:00:00 2001 From: Dave Mihalcik Date: Fri, 12 Jun 2026 14:09:16 -0400 Subject: [PATCH 1/2] feat(xtest): Adds 4.3.0 explicit version check --- xtest/test_tdfs.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/xtest/test_tdfs.py b/xtest/test_tdfs.py index a17fea06..e9693efc 100644 --- a/xtest/test_tdfs.py +++ b/xtest/test_tdfs.py @@ -138,6 +138,36 @@ def test_tdf_spec_target_422( assert filecmp.cmp(pt_file, rt_file) +def test_tdf_spec_target_430( + encrypt_sdk: tdfs.SDK, + decrypt_sdk: tdfs.SDK, + pt_file: Path, + in_focus: set[tdfs.SDK], + attribute_default_rsa: Attribute, + encrypted_tdf: EncryptFactory, +): + if not in_focus & {encrypt_sdk, decrypt_sdk}: + pytest.skip("Not in focus") + if not encrypt_sdk.supports("hexaflexible"): + pytest.skip( + f"Encrypt SDK {encrypt_sdk} doesn't support targeting container format 4.2.2" + ) + if not decrypt_sdk.supports("hexless"): + pytest.skip( + f"Decrypt SDK {decrypt_sdk} doesn't support hexless integrity information in container format 4.3.0" + ) + + ct_file = encrypted_tdf( + encrypt_sdk, + target_mode="4.3.0", + attr_values=attribute_default_rsa.value_fqns, + ) + + rt_file = encrypted_tdf.rt_file(ct_file, decrypt_sdk) + decrypt_sdk.decrypt(ct_file, rt_file, "ztdf") + assert filecmp.cmp(pt_file, rt_file) + + def looks_like_422(manifest: tdfs.Manifest): assert manifest.schemaVersion is None From cdcdf8bafabc59849c07b404f0d4015c42747bb3 Mon Sep 17 00:00:00 2001 From: Dave Mihalcik Date: Fri, 12 Jun 2026 14:38:30 -0400 Subject: [PATCH 2/2] fixup --- xtest/test_tdfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtest/test_tdfs.py b/xtest/test_tdfs.py index e9693efc..1b528ab5 100644 --- a/xtest/test_tdfs.py +++ b/xtest/test_tdfs.py @@ -150,7 +150,7 @@ def test_tdf_spec_target_430( pytest.skip("Not in focus") if not encrypt_sdk.supports("hexaflexible"): pytest.skip( - f"Encrypt SDK {encrypt_sdk} doesn't support targeting container format 4.2.2" + f"Encrypt SDK {encrypt_sdk} doesn't support targeting container format 4.3.0" ) if not decrypt_sdk.supports("hexless"): pytest.skip(