Skip to content

Commit bb0b3de

Browse files
authored
Test that leaf bundles contain expected data (#238)
* return the dir of the log * add TODO * verify that entries in the log are correct # Conflicts: # internal/scti/handlers_test.go # Conflicts: # internal/scti/handlers_test.go * add a function to parse Entries * display a more useful message # Conflicts: # internal/scti/handlers_test.go * Address comments
1 parent f69a3d8 commit bb0b3de

File tree

3 files changed

+278
-81
lines changed

3 files changed

+278
-81
lines changed

internal/scti/handlers.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ func deadlineTime(opts *HandlerOptions) time.Time {
392392

393393
// verifyAddChain is used by add-chain and add-pre-chain. It does the checks that the supplied
394394
// cert is of the correct type and chains to a trusted root.
395+
// TODO(phbnf): add tests
396+
// TODO(phbnf): move to chain_validation.go
395397
func verifyAddChain(log *log, req rfc6962.AddChainRequest, expectingPrecert bool) ([]*x509.Certificate, error) {
396398
// We already checked that the chain is not empty so can move on to verification
397399
validPath, err := validateChain(req.Chain, log.chainValidationOpts)
@@ -451,7 +453,8 @@ func marshalAndWriteAddChainResponse(sct *rfc6962.SignedCertificateTimestamp, w
451453

452454
// entryFromChain generates an Entry from a chain and timestamp.
453455
// copied from certificate-transparency-go/serialization.go
454-
// TODO(phboneff): move in a different file maybe?
456+
// TODO(phboneff): move to ct.go
457+
// TODO(phboneff): add tests
455458
func entryFromChain(chain []*x509.Certificate, isPrecert bool, timestamp uint64) (*ctonly.Entry, error) {
456459
leaf := ctonly.Entry{
457460
IsPrecert: isPrecert,

0 commit comments

Comments
 (0)