aboutsummaryrefslogtreecommitdiff
path: root/pkg/storage
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/storage')
-rw-r--r--pkg/storage/index/index.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/storage/index/index.go b/pkg/storage/index/index.go
index 36a9334..0056565 100644
--- a/pkg/storage/index/index.go
+++ b/pkg/storage/index/index.go
@@ -78,8 +78,11 @@ func (ix *Index) AddEntries(logID [sha256.Size]byte, entries []monitor.LogEntry)
if !ix.mem.addEntry(crtID, path) {
return nil // duplicate
}
-
- return ioutil.CommitJSON(path, entry)
+ if err := ioutil.CommitJSON(path, entry); err != nil {
+ return err
+ }
+ path = fmt.Sprintf("%s/%x-%d.der", ix.cfg.MatchDirectory, logID[:], entry.LeafIndex)
+ return ioutil.CommitData(path, crt.Raw)
}
for _, entry := range entries {