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

fix: CMS content type check #35

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

JeyJeyGao
Copy link
Contributor

What this PR does / why we need it:
Previously, the CMS package was generically designed for RFC 5652. However, since the CMS package will not be exported and we only need to care about RFC 3161, we can restrict the CMS content type to TSTInfo (id-ct-TSTInfo) to fail fast.

Which issue(s) this PR resolves (optional, in resolves #<issue number>(, resolves #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Resolves #33

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.52%. Comparing base (df25ef8) to head (50a72b3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
- Coverage   95.24%   94.52%   -0.72%     
==========================================
  Files          19       19              
  Lines         736      932     +196     
==========================================
+ Hits          701      881     +180     
- Misses         18       34      +16     
  Partials       17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

internal/cms/signed.go Outdated Show resolved Hide resolved
internal/cms/signed.go Outdated Show resolved Hide resolved
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
@JeyJeyGao JeyJeyGao requested a review from shizhMSFT October 28, 2024 01:57
internal/cms/signed.go Outdated Show resolved Hide resolved
Signed-off-by: Junjie Gao <[email protected]>
@JeyJeyGao JeyJeyGao requested a review from Two-Hearts October 28, 2024 02:43
Copy link
Contributor

@Two-Hearts Two-Hearts left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@priteshbandi priteshbandi left a comment

Choose a reason for hiding this comment

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

LGTM

@JeyJeyGao JeyJeyGao merged commit a614afb into notaryproject:main Oct 29, 2024
9 checks passed
@JeyJeyGao JeyJeyGao deleted the fix/cms_content_type_check branch October 29, 2024 00:34
@Two-Hearts Two-Hearts mentioned this pull request Dec 5, 2024
6 tasks
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.

Fail fast on cms verifySignedAttributes
4 participants