Skip to content

Commit

Permalink
fill correct fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
aditsachde committed Aug 5, 2024
1 parent b059a19 commit 177b12e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/sunlight/tile_ol.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package sunlight

import (
"crypto/sha256"
"fmt"
"math"

Expand Down Expand Up @@ -183,7 +184,11 @@ func ReadTileLeaf(tile []byte) (e *LogEntry, rest []byte, err error) {
}
e.ChainFp = append(e.ChainFp, fingerprint)
}
e.CertificateFp = e.ChainFp[0]
if e.IsPrecert {
e.CertificateFp = sha256.Sum256(e.PreCertificate)
} else {
e.CertificateFp = sha256.Sum256(e.Certificate)
}

var extensionType uint8
var extensionData cryptobyte.String
Expand Down

0 comments on commit 177b12e

Please sign in to comment.