From 74374c960fbd7ee44a1b4b03e8c6d57c1d85f776 Mon Sep 17 00:00:00 2001 From: Philippe Boneff Date: Fri, 23 Jun 2023 10:20:20 +0200 Subject: [PATCH 1/2] support all_logs_list --- loglist3/loglist3.go | 3 +++ loglist3/loglist3_test.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/loglist3/loglist3.go b/loglist3/loglist3.go index 6c3b23d8be..c81726515c 100644 --- a/loglist3/loglist3.go +++ b/loglist3/loglist3.go @@ -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. diff --git a/loglist3/loglist3_test.go b/loglist3/loglist3_test.go index 7e21447921..56c65d0115 100644 --- a/loglist3/loglist3_test.go +++ b/loglist3/loglist3_test.go @@ -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{ @@ -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"}}},` + From 85ba8222aca0d9cb861a9d6451f4b5e18f61b3e4 Mon Sep 17 00:00:00 2001 From: Philippe Boneff Date: Fri, 23 Jun 2023 10:35:21 +0200 Subject: [PATCH 2/2] update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99e7b88daa..f9ea426ca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.