diff --git a/CHANGELOG.md b/CHANGELOG.md index 7104a6747..268bd6e95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ All versions prior to 0.9.0 are untracked. ## [Unreleased] +* Fixed issue where a trust root with multiple rekor keys was not considered valid: + Now any rekor key listed in the trust root is considered good to verify entries + [#1350](https://github.com/sigstore/sigstore-python/pull/1350) + ## [3.6.1] ### Fixed diff --git a/sigstore/_internal/trust.py b/sigstore/_internal/trust.py index dbd5f75ba..b9f03d15a 100644 --- a/sigstore/_internal/trust.py +++ b/sigstore/_internal/trust.py @@ -382,8 +382,8 @@ def rekor_keyring(self, purpose: KeyringPurpose) -> RekorKeyring: """Return keyring with keys for Rekor.""" keys: list[_PublicKey] = list(self._get_tlog_keys(self._inner.tlogs, purpose)) - if len(keys) != 1: - raise MetadataError("Did not find one Rekor key in trusted root") + if len(keys) == 0: + raise MetadataError("Did not find any Rekor keys in trusted root") return RekorKeyring(Keyring(keys)) def ct_keyring(self, purpose: KeyringPurpose) -> CTKeyring: