Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump go to use v1.23 #831

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
version: v1.58
version: v1.61
args: --timeout=10m --verbose
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/sigstore/timestamp-authority

go 1.22.0

toolchain go1.22.1
go 1.23.1

require (
cloud.google.com/go/security v1.17.4
Expand Down
4 changes: 2 additions & 2 deletions pkg/signer/tink.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func getPrimaryKey(ks *tinkpb.Keyset) *tinkpb.KeyData {
// validateEcdsaPrivKey validates the given ECDSAPrivateKey.
// https://github.com/google/tink/blob/9753ffddd4d04aa56e0605ff4a0db46f2fb80529/go/signature/ecdsa_signer_key_manager.go#L139
func validateEcdsaPrivKey(key *ecdsapb.EcdsaPrivateKey) error {
if err := keyset.ValidateKeyVersion(key.Version, uint32(ecdsaSignerKeyVersion)); err != nil {
if err := keyset.ValidateKeyVersion(key.Version, uint32(ecdsaSignerKeyVersion)); err != nil { //nolint:gosec
return fmt.Errorf("ecdsa_signer_key_manager: invalid key: %w", err)
}
hash, curve, encoding := getECDSAParamNames(key.PublicKey.Params)
Expand All @@ -178,7 +178,7 @@ func getECDSAParamNames(params *ecdsapb.EcdsaParams) (string, string, string) {
// validateEd25519PrivKey validates the given ED25519PrivateKey.
// https://github.com/google/tink/blob/9753ffddd4d04aa56e0605ff4a0db46f2fb80529/go/signature/ed25519_signer_key_manager.go#L132
func validateEd25519PrivKey(key *ed25519pb.Ed25519PrivateKey) error {
if err := keyset.ValidateKeyVersion(key.Version, uint32(ed25519SignerKeyVersion)); err != nil {
if err := keyset.ValidateKeyVersion(key.Version, uint32(ed25519SignerKeyVersion)); err != nil { //nolint:gosec
return fmt.Errorf("ed25519_signer_key_manager: invalid key: %w", err)
}
if len(key.KeyValue) != ed25519.SeedSize {
Expand Down
2 changes: 1 addition & 1 deletion pkg/verification/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func verifyTSRWithChain(ts *timestamp.Timestamp, opts VerifyOpts) error {
return fmt.Errorf("error parsing hashed message: %w", err)
}

if opts.Roots == nil || len(opts.Roots) == 0 {
if len(opts.Roots) == 0 {
return fmt.Errorf("no root certificates provided for verifying the certificate chain")
}

Expand Down
Loading