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 checkpoint verification #660

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Add checkpoint verification #660

merged 1 commit into from
Mar 26, 2024

Conversation

loosebazooka
Copy link
Member

negative test cases are here: sigstore/sigstore-conformance#139

it's always a bit weird to mirror those test cases in sigstore-java, but I guess I can?

Signed-off-by: Appu Goundan <[email protected]>
Copy link
Collaborator

@haydentherapper haydentherapper left a comment

Choose a reason for hiding this comment

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

Looks great!

@loosebazooka loosebazooka merged commit 9ec514d into main Mar 26, 2024
15 checks passed
@loosebazooka loosebazooka deleted the verify-checkpoints branch March 26, 2024 18:41
var keyHash = Hashing.sha256().hashBytes(tlog.getPublicKey().getRawBytes()).asBytes();
// checkpoint 0 is always the log, not any of the cross signing verifiers/monitors
var sig = checkpoint.getSignatures().get(0);
for (int i = 0; i < 4; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

what is the 4 for?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Key ID is 4 bytes, https://github.com/sigstore/rekor/blob/main/pkg/util/signed_note.go#L140, truncated public key hash

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

that should be added in a comment at least IMO

Copy link
Member Author

Choose a reason for hiding this comment

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

It's defined in the spec and the spec is linked in the checkpoint type

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

3 participants