aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-03-18 20:56:46 +0100
committerRasmus Dahlberg <rasmus@rgdd.se>2023-03-18 20:56:46 +0100
commit3e981e5666b36847adc6fd210c01e7219def49c7 (patch)
tree36ef3c644d45095c9660d0b3879d7f0ef0dad95b
parent5a4d99795ed1fb94035590b811a0b7d6e083a1ff (diff)
Manually add version+logID to STH structv0.0.1
Will probably make the data set manifest simpler.
-rw-r--r--cmd_snapshot.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd_snapshot.go b/cmd_snapshot.go
index 53923f2..464c684 100644
--- a/cmd_snapshot.go
+++ b/cmd_snapshot.go
@@ -63,14 +63,12 @@ func snapshot(opts options) error {
if err != nil {
return fmt.Errorf("%s: %v", *log.Description, err)
}
+ nextSTH.Version = ct.V1
+ nextSTH.LogID = id
nextSTHBytes, err := json.Marshal(nextSTH)
if err != nil {
return fmt.Errorf("%s: %v", *log.Description, err)
}
- //
- // It's a bit ugly that ct.SignedTreeHead contains fields that
- // are not populated. Doesn't cause any prolems here, however.
- //
// Bootstrap log if we don't have any STH yet
if _, err := os.Stat(sthFile); err != nil {