sigstore / sigstore-java

java clients for sigstore
Apache License 2.0
39 stars 21 forks source link

SHA-256 (only) not supported as a hash (root-signing-staging compat) #794

Closed jku closed 2 months ago

jku commented 2 months ago

Theoretically sigstore-java supports both/either sha256 and sha512 as TUF artifact/targetfile hash.

Unfortunately the download url is wrong if repository does not use sha512: versionedTargetName = targetData.getHashes().getSha512() + "." + targetName; this should use one of the hashes actually used by the repository.

This came up in root-signing-staging:

Slight complication is that production root-signing is about to migrate to tuf-on-ci and the original plan was to make some artifact changes right away... Current plan is:

jku commented 2 months ago

There is currently a root-signing-staging deployment waiting on a decision on this

We deployed this change to staging after a discussion with @loosebazooka: