File tree Expand file tree Collapse file tree 6 files changed +12
-10
lines changed
Expand file tree Collapse file tree 6 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,12 @@ package options
66import (
77 "errors"
88
9+ "github.com/carabiner-dev/signer/sigstore"
910 "github.com/sigstore/sigstore/pkg/oauthflow"
1011)
1112
1213var DefaultSigner = Signer {
13- SigstoreRootsData : DefaultRoots , // Embedded data from the rootsfile
14+ SigstoreRootsData : sigstore . DefaultRoots , // Embedded data from the rootsfile
1415}
1516
1617// Signer
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import (
1515// TestEnsureDefaultSigstore checks that the default sigstore
1616// options match the first instance in the roots file.
1717func TestEnsureDefaultSigstore (t * testing.T ) {
18- conf , err := sigstore .ParseRoots (DefaultRoots )
18+ conf , err := sigstore .ParseRoots (sigstore . DefaultRoots )
1919 require .NoError (t , err )
2020
2121 moded := DefaultSigstore
@@ -37,13 +37,13 @@ func TestDefaultRoots(t *testing.T) {
3737 }{
3838 {"top-level-file" , func (t * testing.T ) * sigstore.SigstoreRoots {
3939 t .Helper ()
40- roots , err := sigstore .ParseRootsFile ("sigstore-roots.json" )
40+ roots , err := sigstore .ParseRootsFile ("../ sigstore-roots.json" )
4141 require .NoError (t , err )
4242 return roots
4343 }},
4444 {"options-embed" , func (t * testing.T ) * sigstore.SigstoreRoots {
4545 t .Helper ()
46- roots , err := sigstore .ParseRoots (DefaultRoots )
46+ roots , err := sigstore .ParseRoots (sigstore . DefaultRoots )
4747 require .NoError (t , err )
4848 return roots
4949 }},
Original file line number Diff line number Diff line change @@ -5,11 +5,9 @@ package options
55
66import (
77 "crypto"
8- _ "embed"
9- )
108
11- //go:embed sigstore-roots.json
12- var DefaultRoots [] byte
9+ "github.com/carabiner-dev/signer/ sigstore"
10+ )
1311
1412type VerifierOptFunc func (* Verifier )
1513
@@ -37,7 +35,7 @@ type Verifier struct {
3735// DefaultVerifier default options to configure the verifier
3836var DefaultVerifier = Verifier {
3937 Verification : DefaultVerification ,
40- SigstoreRootsData : DefaultRoots , // Embedded data from the file
38+ SigstoreRootsData : sigstore . DefaultRoots , // Embedded data from the file
4139}
4240
4341// WithSigstoreRootsPath sets the path to the sigstore roots configuration file
Original file line number Diff line number Diff line change 1- options /sigstore-roots.json
1+ sigstore /sigstore-roots.json
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ import (
1010 "os"
1111)
1212
13+ //go:embed sigstore-roots.json
14+ var DefaultRoots []byte
15+
1316//go:embed roots
1417var rootFiles embed.FS
1518
File renamed without changes.
You can’t perform that action at this time.
0 commit comments