Skip to content

rust-query-crlite: use enrolled.json rather than ccadb report#383

Open
jschanck wants to merge 2 commits intomozilla:mainfrom
jschanck:rqc-use-enrolled-json
Open

rust-query-crlite: use enrolled.json rather than ccadb report#383
jschanck wants to merge 2 commits intomozilla:mainfrom
jschanck:rqc-use-enrolled-json

Conversation

@jschanck
Copy link
Collaborator

@jschanck jschanck commented Feb 18, 2026

The filter generation process produces a nice JSON file from the CCADB CSV report that the backend uses. Rather than worry about parsing the CSV correctly, we can have rust-query-crlite use the latest enrolled.json file.

@jschanck jschanck requested a review from mozkeeler February 18, 2026 20:14
Copy link
Collaborator

@mozkeeler mozkeeler left a comment

Choose a reason for hiding this comment

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

LGTM - just the one comment.

let intermediates_path = db_dir.join("crlite.intermediates");

let encoded_intermediates = intermediates.encode()?;
// Find the lexicographically largest "yyyymmdd-r" prefix among downloaded filter files.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this going to do the right thing if we ever publish more than 9 revisions in a day? (e.g., "20260218-10" I believe will sort before "20260218-9", but we'd want the former here, right?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, although we shouldn't have 10+ revisions and any recent enrolled.json is good enough. There are corner cases regardless of which enrolled.json you download. For example, if an intermediate drops out of the collection between revisions 1 and 2 you can get a false NotEnrolled result when querying the revision 1 filter. All that would be fixed if this program took both an intermediate and an end-entity as input, but I like the convenience of being able to provide just an end-entity.

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.

2 participants

Comments