aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/storage/index/index.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/storage/index/index.go b/pkg/storage/index/index.go
index bf94711..95eb04a 100644
--- a/pkg/storage/index/index.go
+++ b/pkg/storage/index/index.go
@@ -8,6 +8,7 @@ import (
"fmt"
"time"
+ "github.com/google/certificate-transparency-go/x509util"
"rgdd.se/silentct/internal/ioutil"
"rgdd.se/silentct/internal/monitor"
"rgdd.se/silentct/pkg/crtutil"
@@ -81,8 +82,8 @@ func (ix *Index) AddEntries(logID [sha256.Size]byte, entries []monitor.LogEntry)
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)
+ path = fmt.Sprintf("%s/%x-%d.ascii", ix.cfg.MatchDirectory, logID[:], entry.LeafIndex)
+ return ioutil.CommitData(path, []byte(x509util.CertificateToString(&crt)))
}
for _, entry := range entries {