Repository navigation
Conversation
update_key_lists/3 treated stored lists below `min_version` as absent, so `revoked` was always `false` for them. A client release that raises `min_version` after an intermediate key is revoked then kept the registry files cached under that key. The keys of those stored lists now count for `revoked`. The lists still don't count for the rollback checks.
…the payload hash header update_key_lists/3 checks that the root keys signed the fetched intermediate key list before it compares versions, so a list that nobody signed returns `untrusted_key_list` instead of `key_list_rollback` or `key_list_conflict`. A freshness entry that expires more than 60 days from now doesn't count. That is the longest a signing key list, which names the freshness keys, can be valid. hex_repo removes a `x-hex-payload-hash` header that the repository sends from every response, not only from a `200`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four changes to the registry verification with root keys, none of it released yet.
update_key_lists/3treated stored key lists belowmin_versionas absent, sorevokedwas alwaysfalsefor them. A Hex user who upgrades to a release that raisesmin_versionafter an intermediate key was revoked kept the registry files cached under that key. The keys of those stored lists now count forrevoked. The lists still don't count for the rollback checks.update_key_lists/3compared versions before it checked the root signatures of the fetched intermediate key list. Anyone who can change a response could make a client reportkey_list_rollbackorkey_list_conflictwith a list that nobody signed. Such a list now returnsuntrusted_key_list.check_freshness/4accepted any expiry below 2^63, so one freshness signature with a far expiry kept its payload accepted until the freshness key was revoked. An entry that expires more than 60 days from now doesn't count. 60 days is the longest a signing key list, which names the freshness keys, can be valid.hex_reporemoved a server-sentx-hex-payload-hashheader from a200only. A caller that reads the header from a304got the server's value. It's now removed from every response.