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

Add a Cosign signature format carrier #1594

Merged
merged 1 commit into from Jul 7, 2022

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Jul 5, 2022

⚠️ Warning: This is write-only code, as in I haven’t read it after myself, and it has no tests yet.

This is just a way to represent the signature, for other code to read/write it, or create/consume it.

NOTE: This, along with #1593, makes a design decision about how we are going to represent signatures as []byte in stable storage. That has long-term consequences.

Depends on unmerged #1593.

@mtrmac
Copy link
Collaborator Author

mtrmac commented Jul 6, 2022

  • Encapsulated the signature data to make sure underlying slices are not shared/modified.
  • Added unit tests for internal/signature.Cosign to make sure the blob formatting actually works.

Ready for review, apart from the previous-PR dependency.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to merge once the merge-rebase dance is done

Currently, this just allows serializing and deserializing
it as a blob.

NOTE: This makes an implementation decision about the blob format:
we use OpenPGP signatures with no marker, any new formats will
start with a zero byte and an ASCII line identifying the format of the rest.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac mtrmac marked this pull request as ready for review July 7, 2022 12:04
@mtrmac mtrmac merged commit df27ae0 into containers:main Jul 7, 2022
@mtrmac mtrmac deleted the cosign-signature-format branch July 7, 2022 12:39
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.

None yet

2 participants