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

cosign: Make verify-blob compatible with sigstore-python #403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jku
Copy link
Member

@jku jku commented Oct 11, 2024

  • This changes cosign::verify_blob() cert argument: it is no longer PEM that is base64 encoded (on top of the encoding that is part of being a PEM), instead it is PEM as already documented.
  • verify-blob example now works with certificates that are PEM or base64 PEM
  • verify-blob example also trims signature

This makes verify-blob work with python-tuf outputs as well as the cosign outputs.


Fixes #288

Note that this changes the "cosign API": I imagined that this is mostly an internal module but if that is something you want to not change then this approach is probably not good.

* This changes cosign::verify_blob() cert argument: it is no longer PEM
  that is base64 encoded (on top of the encoding that is part of being a
  PEM), instead it is PEM as already documented.
* verify-blob now works with certificates that are PEM or base64 PEM
* verify-blob also trims signature

This makes verify-blob work with python-tuf outputs.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku
Copy link
Member Author

jku commented Oct 11, 2024

I'm not invested in this specific fix, just making improvements to get familiar with the code base. So feel free to suggest alternative approaches.

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.

blob verification fails when used with unsanitized base64 signature strings
1 participant