revocation: support for V1 index format#200
Open
cpu wants to merge 1 commit into
Open
Conversation
The "upkiidx1" magic bytes identify a new V1 index.bin format that is almost identical to the existing "upkiidx0" (V0) format with two main exceptions: 1. The header `num_filenames` count is now a u16 instead of u8 2. The per-entry `filter_index` is now a u16 instead of a u8 These changes are necessary in order to facilitate having more than 255 filter files in the revocation cache. We believe the combination of the webpki decreasing certificate maximum validity periods, and a potential increase in the frequency of filter file production could require more headroom than a maximum of 255 would allow. To accommodate these changes when writing a new index.bin upki will always write the V1 format & data-types. When _reading_ an existing index.bin, both formats are supported and use the correct data type based on the header magic bytes. In the future this can be simplified to only support V1 on the read-path once all extent data is updated to the new format.
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.
The "upkiidx1" magic bytes identify a new V1 index.bin format that is almost identical to the existing "upkiidx0" (V0) format with two main exceptions:
num_filenamescount is now a u16 instead of u8filter_indexis now a u16 instead of a u8These changes are necessary in order to facilitate having more than 255 filter files in the revocation cache. We believe the combination of the webpki decreasing certificate maximum validity periods, and a potential increase in the frequency of filter file production could require more headroom than a maximum of 255 would allow. See the spec discussion thread for more details.
To accommodate these changes, when writing a new index.bin upki will always write the V1 format & data-types. When reading an existing index.bin, both formats are supported and use the correct data type based on the header magic bytes. In the future this can be simplified to only support V1 on the read-path once all extant data is updated to the new format.