Skip to content

Commit 75f7868

Browse files
Mikhail Swiftcolek42
authored andcommitted
fix: use intermediates from rekor
Requires custom rekor installation from https://github.com/testifysec/rekor on the dsse-intermediates branch currently. This will use any intermediates from rekor when verifying signatures from x509 certificates. Signed-off-by: Mikhail Swift <mikhail@testifysec.com>
1 parent cb797dd commit 75f7868

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ require (
110110
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
111111
)
112112

113-
replace github.com/sigstore/rekor v0.4.0 => github.com/testifysec/rekor v0.0.1-dsse-type5
113+
replace github.com/sigstore/rekor => github.com/testifysec/rekor v0.4.0-dsse-intermediates

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,8 +1491,8 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG
14911491
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
14921492
github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
14931493
github.com/tent/canonical-json-go v0.0.0-20130607151641-96e4ba3a7613/go.mod h1:g6AnIpDSYMcphz193otpSIzN+11Rs+AAIIC6rm1enug=
1494-
github.com/testifysec/rekor v0.0.1-dsse-type5 h1:3W9/pzcF+y58UYCp6N9CkioNIxGDPIbvhOzAa1x6IDU=
1495-
github.com/testifysec/rekor v0.0.1-dsse-type5/go.mod h1:u9clLqaVjqV9pExVL1XkM37dGyMCOX/LMocS9nsnWDY=
1494+
github.com/testifysec/rekor v0.4.0-dsse-intermediates h1:vbAA0ToJT9CJd9ZmjT/dJWoYXBCIpDbJReinXNpVJho=
1495+
github.com/testifysec/rekor v0.4.0-dsse-intermediates/go.mod h1:u9clLqaVjqV9pExVL1XkM37dGyMCOX/LMocS9nsnWDY=
14961496
github.com/theupdateframework/go-tuf v0.0.0-20211203210025-7ded50136bf9 h1:Toe1Dy1nG62nh3CLZ6/izUrdgjhV/aGHvvu+uwGykxk=
14971497
github.com/theupdateframework/go-tuf v0.0.0-20211203210025-7ded50136bf9/go.mod h1:n2n6wwC9BEnYS/C/APAtNln0eM5zYAYOkOTx6VEG/mA=
14981498
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=

pkg/rekor/rekor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ func ParseEnvelopeFromEntry(entry *models.LogEntryAnon) (dsse.Envelope, error) {
174174
_, ok := verifier.(*cryptoutil.X509Verifier)
175175
if ok {
176176
envSig.Certificate = sig.PublicKey
177+
for _, intermediate := range sig.Intermediates {
178+
envSig.Intermediates = append(envSig.Intermediates, intermediate)
179+
}
177180
}
178181

179182
env.Signatures = append(env.Signatures, envSig)

0 commit comments

Comments
 (0)