diff --git a/.github/workflows/xtest.yml b/.github/workflows/xtest.yml index 54bd4710..a70ab9e3 100644 --- a/.github/workflows/xtest.yml +++ b/.github/workflows/xtest.yml @@ -31,7 +31,7 @@ jobs: env: PLATFORM_REF: "${{ inputs.platform-ref || 'main' }}" JS_REF: "${{ inputs.js-ref || 'main' }}" - OTDFCTL_REF: "${{ inputs.otdfctl-ref || 'main' }}" + OTDFCTL_REF: "${{ inputs.otdfctl-ref || 'return-invalidtdf-error' }}" JAVA_REF: "${{ inputs.java-ref || 'main' }}" steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 diff --git a/xtest/test_tdfs.py b/xtest/test_tdfs.py index 0227a757..6db38c3d 100644 --- a/xtest/test_tdfs.py +++ b/xtest/test_tdfs.py @@ -121,8 +121,11 @@ def test_tdf_with_unbound_policy(encrypt_sdk, decrypt_sdk, pt_file, tmp_dir): tdfs.decrypt(decrypt_sdk, b_file, rt_file, "ztdf") assert False, "decrypt succeeded unexpectedly" except subprocess.CalledProcessError as exc: - assert b"wrap" in exc.output - assert b"tamper" in exc.output or b"InvalidFileError" in exc.output + assert ( + b"tamper" in exc.output + or b"InvalidFileError" in exc.output + or b"invalid TDF" in exc.output + ) def test_tdf_with_altered_root_sig(encrypt_sdk, decrypt_sdk, pt_file, tmp_dir): @@ -135,8 +138,11 @@ def test_tdf_with_altered_root_sig(encrypt_sdk, decrypt_sdk, pt_file, tmp_dir): tdfs.decrypt(decrypt_sdk, b_file, rt_file, "ztdf") assert False, "decrypt succeeded unexpectedly" except subprocess.CalledProcessError as exc: - assert b"root" in exc.output - assert b"tamper" in exc.output or b"IntegrityError" in exc.output + assert ( + b"tamper" in exc.output + or b"IntegrityError" in exc.output + or b"invalid TDF" in exc.output + ) def test_tdf_with_altered_seg_sig(encrypt_sdk, decrypt_sdk, pt_file, tmp_dir): @@ -149,8 +155,11 @@ def test_tdf_with_altered_seg_sig(encrypt_sdk, decrypt_sdk, pt_file, tmp_dir): tdfs.decrypt(decrypt_sdk, b_file, rt_file, "ztdf") assert False, "decrypt succeeded unexpectedly" except subprocess.CalledProcessError as exc: - assert b"signature" in exc.output - assert b"tamper" in exc.output or b"IntegrityError" in exc.output + assert ( + b"tamper" in exc.output + or b"IntegrityError" in exc.output + or b"invalid TDF" in exc.output + ) def test_tdf_assertions(encrypt_sdk, decrypt_sdk, pt_file, tmp_dir):