aboutsummaryrefslogtreecommitdiff
path: root/pkg/storage/index/index.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rgdd@glasklarteknik.se>2025-01-18 13:39:40 +0100
committerRasmus Dahlberg <rgdd@glasklarteknik.se>2025-01-18 16:34:14 +0100
commit8a17817c61f14a727a1017a5bcd4b1ea82964528 (patch)
treeec0fa96bfc683e906413106f2db2b99d710dc389 /pkg/storage/index/index.go
parent2d3b1f2cb0c05385c1702f1a7d74fa08d52c262f (diff)
prometheus: Refine based on input from anarcatmain
https://gitlab.torproject.org/tpo/tpa/team/-/issues/40677
Diffstat (limited to 'pkg/storage/index/index.go')
-rw-r--r--pkg/storage/index/index.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/storage/index/index.go b/pkg/storage/index/index.go
index 95eb04a..c85a9e9 100644
--- a/pkg/storage/index/index.go
+++ b/pkg/storage/index/index.go
@@ -56,7 +56,7 @@ func (ix *Index) AddChain(node string, pem []byte) error {
var crtID CertificateID
crtID.Set(chain[0])
path := fmt.Sprintf("%s/%s-%s.pem", ix.cfg.TrustDirectory, node, crtID)
- if !ix.mem.addChain(crtID, path) {
+ if !ix.mem.addChain(path, crtID, chain[0].DNSNames) {
return nil // duplicate
}
@@ -76,7 +76,7 @@ func (ix *Index) AddEntries(logID [sha256.Size]byte, entries []monitor.LogEntry)
var crtID CertificateID
crtID.Set(crt)
path := fmt.Sprintf("%s/%x-%d.json", ix.cfg.MatchDirectory, logID[:], entry.LeafIndex)
- if !ix.mem.addEntry(crtID, path) {
+ if !ix.mem.addEntry(path, crtID, crt.DNSNames, logID, entry.LeafIndex) {
return nil // duplicate
}
if err := ioutil.CommitJSON(path, entry); err != nil {