Skip to content

Commit

Permalink
Add support for "is_all_logs" field in loglist3 (#1095)
Browse files Browse the repository at this point in the history
* support all_logs_list

* update CHANGELOG
  • Loading branch information
phbnf authored Jun 26, 2023
1 parent 1bf39e3 commit 5383352
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
### Chrome CT Policy Update
* #906: Update chromepolicy.go to follow the updated Chrome CT policy.

### LogList
* Add support for "is_all_logs" field

### Misc
* #1059: Escape forward slashes in certificate Subject names when used as user quota id strings.

Expand Down
3 changes: 3 additions & 0 deletions loglist3/loglist3.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ const (

// LogList holds a collection of CT logs, grouped by operator.
type LogList struct {
// IsAllLogs is set to true if the list contains all known logs, not
// only usable ones.
IsAllLogs bool `json:"is_all_logs,omitempty"`
// Version is the version of the log list.
Version string `json:"version,omitempty"`
// LogListTimestamp is the time at which the log list was published.
Expand Down
3 changes: 2 additions & 1 deletion loglist3/loglist3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func mustParseTime(format string, sTime string) time.Time {
}

var sampleLogList = LogList{
IsAllLogs: true,
Version: "1.1.1c",
LogListTimestamp: mustParseTime(time.UnixDate, "Fri Dec 3 11:06:00 UTC 2021"),
Operators: []*Operator{
Expand Down Expand Up @@ -158,7 +159,7 @@ func TestJSONMarshal(t *testing.T) {
{
name: "MultiValid",
in: sampleLogList,
want: `{"version":"1.1.1c","log_list_timestamp":"2021-12-03T11:06:00Z","operators":[` +
want: `{"is_all_logs":true,"version":"1.1.1c","log_list_timestamp":"2021-12-03T11:06:00Z","operators":[` +
`{"name":"Google","email":["google-ct-logs@googlegroups.com"],"logs":[` +
`{"description":"Google 'Aviator' log","log_id":"aPaY+B9kgr46jO65KB1M/HFRXWeT1ETRCmesu09P+8Q=","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1/TMabLkDpCjiupacAlP7xNi0I1JYP8bQFAHDG1xhtolSY1l4QgNRzRrvSe8liE+NPWHdjGxfx3JhTsN9x8/6Q==","url":"https://ct.googleapis.com/aviator/","dns":"aviator.ct.googleapis.com","mmd":86400,"state":{"readonly":{"timestamp":"2016-11-30T13:24:18.33Z","final_tree_head":{"sha256_root_hash":"LcGcZRsm+LGYmrlyC5LXhV1T6OD8iH5dNlb0sEJl9bA=","tree_size":46466472}}},"temporal_interval":{"start_inclusive":"2014-03-07T11:06:00Z","end_exclusive":"2015-03-07T12:00:00Z"}},` +
`{"description":"Google 'Icarus' log","log_id":"KTxRllTIOWW6qlD8WAfUt2+/WHopctykwwz05UVH9Hg=","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAETtK8v7MICve56qTHHDhhBOuV4IlUaESxZryCfk9QbG9co/CqPvTsgPDbCpp6oFtyAHwlDhnvr7JijXRD9Cb2FA==","url":"https://ct.googleapis.com/icarus/","dns":"icarus.ct.googleapis.com","mmd":86400,"state":{"usable":{"timestamp":"2018-02-27T00:00:00Z"}}},` +
Expand Down

0 comments on commit 5383352

Please sign in to comment.