File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
11
11
"fmt"
12
12
"log"
13
13
"os"
14
+ "strings"
14
15
15
16
v1 "github.com/google/go-containerregistry/pkg/v1"
16
17
"github.com/google/go-containerregistry/pkg/v1/static"
@@ -76,16 +77,18 @@ func main() {
76
77
log .Fatalf ("error generating objects for signature data: %s" , err .Error ())
77
78
}
78
79
79
- satisfiedVerifiers := []string {}
80
+ allSatisfiedVerifiers := []string {}
80
81
for _ , rootOfTrust := range config .RootsOfTrust {
81
- satisfiedVerifiers , err = verify (imageDigestHash , rootOfTrust , signatures )
82
+ satisfiedVerifiers , err : = verify (imageDigestHash , rootOfTrust , signatures )
82
83
if err != nil {
83
84
log .Fatalf ("error verifying signatures: %s" , err .Error ())
85
+ } else if len (satisfiedVerifiers ) > 0 {
86
+ allSatisfiedVerifiers = append (allSatisfiedVerifiers , satisfiedVerifiers ... )
84
87
}
85
88
}
86
89
87
90
fmt .Println ("satisfied verifiers" )
88
- fmt .Println (satisfiedVerifiers )
91
+ fmt .Println (strings . Join ( allSatisfiedVerifiers , ", " ) )
89
92
}
90
93
91
94
func loadConfiguration () (config Configuration , err error ) {
You can’t perform that action at this time.
0 commit comments