Skip to content

Commit c60e743

Browse files
authored
Add unit tests for SCT verification (#204)
Signed-off-by: Colleen Murphy <[email protected]>
1 parent 96c8fe6 commit c60e743

File tree

4 files changed

+462
-1
lines changed

4 files changed

+462
-1
lines changed

go.mod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ require (
3838
github.com/go-openapi/loads v0.22.0 // indirect
3939
github.com/go-openapi/spec v0.21.0 // indirect
4040
github.com/go-openapi/validate v0.24.0 // indirect
41+
github.com/golang/protobuf v1.5.4 // indirect
4142
github.com/google/go-containerregistry v0.19.0 // indirect
43+
github.com/google/trillian v1.6.0 // indirect
4244
github.com/google/uuid v1.6.0 // indirect
4345
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
4446
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
@@ -83,6 +85,8 @@ require (
8385
golang.org/x/term v0.20.0 // indirect
8486
golang.org/x/text v0.15.0 // indirect
8587
google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7 // indirect
88+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
89+
google.golang.org/grpc v1.62.1 // indirect
8690
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
8791
gopkg.in/ini.v1 v1.67.0 // indirect
8892
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17w
126126
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
127127
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
128128
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
129+
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
130+
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
129131
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
130132
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
131133
github.com/google/certificate-transparency-go v1.1.8 h1:LGYKkgZF7satzgTak9R4yzfJXEeYVAjV6/EAEJOf1to=

pkg/verify/sct.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
// leaf certificate, will extract SCTs from the leaf certificate and verify the
3030
// timestamps using the TrustedMaterial's FulcioCertificateAuthorities() and
3131
// CTLogs()
32-
// TODO(issue#46): Add unit tests
3332
func VerifySignedCertificateTimestamp(leafCert *x509.Certificate, threshold int, trustedMaterial root.TrustedMaterial) error { // nolint: revive
3433
ctlogs := trustedMaterial.CTLogs()
3534
fulcioCerts := trustedMaterial.FulcioCertificateAuthorities()

0 commit comments

Comments
 (0)