Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): MIC-1436: User can decrypt TDF files created with FileWatcher2.0.8 and older. #1833

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

mustyantsev
Copy link
Contributor

Proposed Changes

*We need decrypt old FW tdf files. Old FW tdf files do not support SID and assertions are represented as JSON object

Checklist

  • [x ] I have added or updated unit tests
  • I have added or updated integration tests (if appropriate)
  • I have added or updated documentation

Testing Instructions

@mustyantsev mustyantsev requested review from a team as code owners December 24, 2024 14:59
@mustyantsev mustyantsev changed the title MIC-1436: User can decrypt TDF files created with FileWatcher2.0.8 and older. feat(sdk): MIC-1436: User can decrypt TDF files created with FileWatcher2.0.8 and older. Dec 24, 2024
sujankota
sujankota previously approved these changes Jan 6, 2025
@dmihalcik-virtru dmihalcik-virtru self-requested a review January 8, 2025 15:42
sdk/assertion.go Outdated Show resolved Hide resolved
sdk/tdf.go Outdated
@@ -863,6 +863,10 @@ func (r *Reader) doPayloadKeyUnwrap(ctx context.Context) error { //nolint:gocogn

unencryptedMetadata = metaData
}

if r.manifest.EncryptionInformation.KeyAccessObjs[0].SplitID == "" {
Copy link
Member

Choose a reason for hiding this comment

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

If this is for treating sid-less multi-kao files as 'or', you should instead remove the mixedSplits processing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dmihalcik-virtru is that what you meant (remove the mixedSplits)?

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 you can also get rid of the if mixedSplits && ... block below and remove the variable entirely

Copy link
Member

Choose a reason for hiding this comment

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

If removing it is causing a regression, you can add this back and I'll take a look after this gets merged in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you can also get rid of the if mixedSplits && ... block below and remove the variable entirely

got it - i will do changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants