Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ func setRootOfTrustCosignOptions(cosignOptions *cosign.CheckOpts, rootOfTrust Ro
}
// sct pub keys
if rootOfTrust.SCTPublicKey != "" {
return errors.New("providing an SCTPublicKey in the root of trust configuration has not yet been implemented")
sctPubKeyCollection := cosign.NewTrustedTransparencyLogPubKeys()
if err := sctPubKeyCollection.AddTransparencyLogPubKey([]byte(rootOfTrust.SCTPublicKey), tuf.Active); err != nil {
return fmt.Errorf("could not add custom sct public key to collection: %w", err)
}
cosignOptions.CTLogPubKeys = &sctPubKeyCollection
} else {
cosignOptions.CTLogPubKeys, err = cosign.GetCTLogPubs(ctx)
if err != nil {
Expand Down