diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6f2308fbbae..9230c40bb48 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -47,7 +47,10 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 with: - version: v2.11 + version: v2.14.0 + # Prebuilt binaries are built with Go 1.26 and refuse to lint a Go 1.27 + # module; build from source with the Go installed by setup-go. + install-mode: goinstall golangci-test-e2e: name: lint-test-e2e @@ -73,5 +76,8 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 with: - version: v2.11 + version: v2.14.0 + # Prebuilt binaries are built with Go 1.26 and refuse to lint a Go 1.27 + # module; build from source with the Go installed by setup-go. + install-mode: goinstall args: --build-tags e2e ./test diff --git a/.github/workflows/validate-release.yml b/.github/workflows/validate-release.yml index b6f3e95339a..5d89fec7c67 100644 --- a/.github/workflows/validate-release.yml +++ b/.github/workflows/validate-release.yml @@ -43,7 +43,7 @@ jobs: - check-signature container: - image: tykio/golang-cross:1.26-bullseye-pgo@sha256:4675026d8d88dd88b736d607fb3dfa210f0d962d5a7d77c88343e7520e79b962 + image: tykio/golang-cross:1.27-bullseye-pgo@sha256:f9159702c6eb6cbc70bf64b6ae3fba4583c6ac7090a93f305b4675202e402c61 volumes: - /usr:/host_usr - /opt:/host_opt diff --git a/Dockerfile b/Dockerfile index 1d66ffc2009..951acee15f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,4 @@ # This is used to we scrap the go version and use in CI to get the latest go version # and we use dependabot to keep the go version up to date -FROM golang:1.27.1 +FROM golang:1.27.2 diff --git a/cmd/cosign/cli/verify/verify_blob_test.go b/cmd/cosign/cli/verify/verify_blob_test.go index a8e30a0c8f4..66d7622acff 100644 --- a/cmd/cosign/cli/verify/verify_blob_test.go +++ b/cmd/cosign/cli/verify/verify_blob_test.go @@ -159,7 +159,7 @@ func TestVerifyBlob(t *testing.T) { unexpiredCertPem, _ := cryptoutils.MarshalCertificateToPEM(unexpiredLeafCert) expiredLeafCert, _ := test.GenerateLeafCertWithExpiration(identity, issuer, - time.Now().Add(-time.Hour), leafPriv, rootCert, rootPriv) + time.Now().Add(-10*time.Minute), leafPriv, rootCert, rootPriv) expiredLeafPem, _ := cryptoutils.MarshalCertificateToPEM(expiredLeafCert) // Make rekor signer @@ -192,7 +192,7 @@ func TestVerifyBlob(t *testing.T) { otherSignature := makeSignature(otherBytes) // initialize timestamp for expired and unexpired certificates - expiredTSAOpts := mock.TSAClientOptions{Time: time.Now().Add(-time.Hour), Message: []byte(blobSignature)} + expiredTSAOpts := mock.TSAClientOptions{Time: time.Now().Add(-1 * time.Minute), Message: []byte(blobSignature)} unexpiredTSAOpts := mock.TSAClientOptions{Time: time.Now(), Message: []byte(blobSignature)} tsaClient, err := mock.NewTSAClient(expiredTSAOpts) if err != nil { diff --git a/go.mod b/go.mod index d3056b26b86..37aae495b0c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/sigstore/cosign/v2 -go 1.27.1 +go 1.27.2 require ( cuelang.org/go v0.14.1 @@ -53,10 +53,10 @@ require ( github.com/transparency-dev/merkle v0.0.2 github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 gitlab.com/gitlab-org/api/client-go v0.143.3 - golang.org/x/crypto v0.56.0 + golang.org/x/crypto v0.57.0 golang.org/x/oauth2 v0.36.0 - golang.org/x/sync v0.22.0 - golang.org/x/term v0.45.0 + golang.org/x/sync v0.23.0 + golang.org/x/term v0.46.0 google.golang.org/api v0.280.0 google.golang.org/protobuf v1.36.11 k8s.io/api v0.35.3 @@ -279,10 +279,10 @@ require ( go.uber.org/zap v1.28.0 // indirect go.yaml.in/yaml/v2 v2.4.4 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/mod v0.40.0 // indirect - golang.org/x/net v0.58.0 // indirect - golang.org/x/sys v0.47.0 // indirect - golang.org/x/text v0.41.0 // indirect + golang.org/x/mod v0.41.0 // indirect + golang.org/x/net v0.60.0 // indirect + golang.org/x/sys v0.48.0 // indirect + golang.org/x/text v0.42.0 // indirect golang.org/x/time v0.15.0 // indirect golang.org/x/tools v0.49.0 // indirect google.golang.org/genproto v0.0.0-20260319201613-d00831a3d3e7 // indirect diff --git a/go.sum b/go.sum index 12e3091b982..f6905f828b1 100644 --- a/go.sum +++ b/go.sum @@ -801,8 +801,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.56.0 h1:GUh5Ii4J5jtcseSMiRqr1jXCNHoxjeV9Fmekc2oLy6Y= -golang.org/x/crypto v0.56.0/go.mod h1:OMW5y6CY9l38uPLmxU6l6pwcXp1obtLo3e6gT7gQR2I= +golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M= +golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -811,8 +811,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= -golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= +golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= +golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -835,8 +835,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= -golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= +golang.org/x/net v0.60.0 h1:79p50tfZlm0J9YfoDsSi639qSXNGVwEzOPLCxM2FsYU= +golang.org/x/net v0.60.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= @@ -849,8 +849,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= -golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -878,16 +878,16 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= -golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0= -golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= +golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE= +golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -897,8 +897,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= -golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= +golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= +golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/internal/pkg/cosign/tsa/client/client.go b/internal/pkg/cosign/tsa/client/client.go index b07eff365d4..b59e75f1790 100644 --- a/internal/pkg/cosign/tsa/client/client.go +++ b/internal/pkg/cosign/tsa/client/client.go @@ -75,7 +75,6 @@ func getHTTPTransport(cacertFilename, certFilename, keyFilename, serverName stri DialContext: (&net.Dialer{ Timeout: timeout, KeepAlive: 30 * time.Second, - DualStack: true, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, diff --git a/test/e2e_attach_test.go b/test/e2e_attach_test.go index 6dc7cda09e9..3e3a92df4bd 100644 --- a/test/e2e_attach_test.go +++ b/test/e2e_attach_test.go @@ -172,6 +172,8 @@ func TestAttachWithRFC3161Timestamp(t *testing.T) { // TSA server needed to create timestamp viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) apiServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) server := httptest.NewServer(apiServer.GetHandler()) t.Cleanup(server.Close) diff --git a/test/e2e_test.go b/test/e2e_test.go index a3532e873ce..78c6061a02c 100644 --- a/test/e2e_test.go +++ b/test/e2e_test.go @@ -601,6 +601,8 @@ func TestSignVerifyWithTUFMirror(t *testing.T) { tufMirror := t.TempDir() viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) tsaAPIServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) tsaServer := httptest.NewServer(tsaAPIServer.GetHandler()) t.Cleanup(tsaServer.Close) @@ -867,6 +869,8 @@ func TestSignAttestVerifyBlobWithSigningConfig(t *testing.T) { tufMirror := t.TempDir() viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) tsaAPIServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) tsaServer := httptest.NewServer(tsaAPIServer.GetHandler()) t.Cleanup(tsaServer.Close) @@ -977,6 +981,8 @@ func TestSignAttestVerifyContainerWithSigningConfig(t *testing.T) { tufMirror := t.TempDir() viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) tsaAPIServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) tsaServer := httptest.NewServer(tsaAPIServer.GetHandler()) t.Cleanup(tsaServer.Close) @@ -1085,6 +1091,8 @@ func TestSignVerifyWithSigningConfigWithKey(t *testing.T) { tufMirror := t.TempDir() viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) tsaAPIServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) tsaServer := httptest.NewServer(tsaAPIServer.GetHandler()) t.Cleanup(tsaServer.Close) @@ -1793,6 +1801,8 @@ func TestAttestationRFC3161Timestamp(t *testing.T) { // TSA server needed to create timestamp viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) apiServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) server := httptest.NewServer(apiServer.GetHandler()) t.Cleanup(server.Close) @@ -1884,6 +1894,8 @@ func TestAttestationBlobRFC3161Timestamp(t *testing.T) { // TSA server needed to create timestamp viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) apiServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) server := httptest.NewServer(apiServer.GetHandler()) t.Cleanup(server.Close) @@ -1993,6 +2005,8 @@ func TestVerifyWithCARoots(t *testing.T) { // TSA server needed to create timestamp viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) apiServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) server := httptest.NewServer(apiServer.GetHandler()) t.Cleanup(server.Close) @@ -2355,6 +2369,8 @@ func TestRFC3161Timestamp(t *testing.T) { // TSA server needed to create timestamp viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) apiServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) server := httptest.NewServer(apiServer.GetHandler()) t.Cleanup(server.Close) @@ -2416,6 +2432,8 @@ func TestRekorBundleAndRFC3161Timestamp(t *testing.T) { // TSA server needed to create timestamp viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) apiServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) server := httptest.NewServer(apiServer.GetHandler()) t.Cleanup(server.Close) @@ -2959,6 +2977,8 @@ func TestSignBlobRFC3161TimestampBundle(t *testing.T) { // TSA server needed to create timestamp viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) apiServer := server.NewRestAPIServer("localhost", 0, []string{"http"}, false, 10*time.Second, 10*time.Second) server := httptest.NewServer(apiServer.GetHandler()) t.Cleanup(server.Close) diff --git a/test/e2e_tsa_test.go b/test/e2e_tsa_test.go index 32588cfaf64..6df44bcabc9 100644 --- a/test/e2e_tsa_test.go +++ b/test/e2e_tsa_test.go @@ -179,6 +179,8 @@ func generateMTLSKeys(t *testing.T, td string) (string, string, string, string, func setUpTSAServerWithTLS(t *testing.T, td, timestampCACert, timestampServerKey, timestampServerCert string) (string, string, func()) { viper.Set("timestamp-signer", "memory") viper.Set("timestamp-signer-hash", "sha256") + viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2") + viper.Set("accepted-policy-oids", []string{"1.3.6.1.4.1.57264.2"}) viper.Set("disable-ntp-monitoring", true) viper.Set("tls-host", "0.0.0.0") viper.Set("tls-port", 3000)