Skip to content

Commit 96f9f88

Browse files
committed
*: Make suggested linter changes
1 parent 0f3a4a7 commit 96f9f88

File tree

12 files changed

+36
-42
lines changed

12 files changed

+36
-42
lines changed

cjson/canonicaljson.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ func encodeCanonical(obj interface{}, result *strings.Builder) (err error) {
9696
if i < (len(mapKeys) - 1) {
9797
result.WriteString(",")
9898
}
99-
i++
10099
}
101100
result.WriteString("}")
102101

cjson/canonicaljson_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func BenchmarkEncodeCanonical(b *testing.B) {
135135
for _, v := range table {
136136
b.Run(fmt.Sprintf("input_size_%d", len(v.input)), func(b *testing.B) {
137137
for i := 0; i < b.N; i++ {
138-
EncodeCanonical(v.input)
138+
EncodeCanonical(v.input) //nolint:errcheck
139139
}
140140
})
141141
}

dsse/envelope.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type Signature struct {
3838
}
3939

4040
/*
41-
PAE implementes the DSSE Pre-Authentic Encoding
41+
PAE implements the DSSE Pre-Authentic Encoding
4242
https://github.com/secure-systems-lab/dsse/blob/master/protocol.md#signature-definition
4343
*/
4444
func PAE(payloadType string, payload []byte) []byte {

dsse/sign.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ algorithms to sign the data. The threshold parameter is legacy and is ignored.
4747
Deprecated: This function simply calls NewEnvelopeSigner, and that function should
4848
be preferred.
4949
*/
50-
func NewMultiEnvelopeSigner(threshold int, p ...Signer) (*EnvelopeSigner, error) {
50+
func NewMultiEnvelopeSigner(_ int, p ...Signer) (*EnvelopeSigner, error) {
5151
return NewEnvelopeSigner(p...)
5252
}
5353

dsse/sign_test.go

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ func TestPAE(t *testing.T) {
4141

4242
type nilSignerVerifier int
4343

44-
func (n nilSignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
44+
func (n nilSignerVerifier) Sign(_ context.Context, data []byte) ([]byte, error) {
4545
return data, nil
4646
}
4747

48-
func (n nilSignerVerifier) Verify(ctx context.Context, data, sig []byte) error {
48+
func (n nilSignerVerifier) Verify(_ context.Context, data, sig []byte) error {
4949
if len(data) != len(sig) {
5050
return errLength
5151
}
@@ -69,11 +69,11 @@ func (n nilSignerVerifier) Public() crypto.PublicKey {
6969

7070
type nullSignerVerifier int
7171

72-
func (n nullSignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
72+
func (n nullSignerVerifier) Sign(_ context.Context, data []byte) ([]byte, error) {
7373
return data, nil
7474
}
7575

76-
func (n nullSignerVerifier) Verify(ctx context.Context, data, sig []byte) error {
76+
func (n nullSignerVerifier) Verify(_ context.Context, data, sig []byte) error {
7777
if len(data) != len(sig) {
7878
return errLength
7979
}
@@ -97,11 +97,11 @@ func (n nullSignerVerifier) Public() crypto.PublicKey {
9797

9898
type errsigner int
9999

100-
func (n errsigner) Sign(ctx context.Context, data []byte) ([]byte, error) {
100+
func (n errsigner) Sign(_ context.Context, _ []byte) ([]byte, error) {
101101
return nil, fmt.Errorf("signing error")
102102
}
103103

104-
func (n errsigner) Verify(ctx context.Context, data, sig []byte) error {
104+
func (n errsigner) Verify(_ context.Context, _, _ []byte) error {
105105
return errVerify
106106
}
107107

@@ -118,11 +118,11 @@ type errSignerVerifier int
118118
var errVerify = fmt.Errorf("accepted signatures do not match threshold, Found: 0, Expected 1")
119119
var errThreshold = fmt.Errorf("invalid threshold")
120120

121-
func (n errSignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
121+
func (n errSignerVerifier) Sign(_ context.Context, data []byte) ([]byte, error) {
122122
return data, nil
123123
}
124124

125-
func (n errSignerVerifier) Verify(ctx context.Context, data, sig []byte) error {
125+
func (n errSignerVerifier) Verify(_ context.Context, _, _ []byte) error {
126126
return errVerify
127127
}
128128

@@ -136,12 +136,11 @@ func (n errSignerVerifier) Public() crypto.PublicKey {
136136

137137
type badverifier int
138138

139-
func (n badverifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
139+
func (n badverifier) Sign(_ context.Context, data []byte) ([]byte, error) {
140140
return append(data, byte(0)), nil
141141
}
142142

143-
func (n badverifier) Verify(ctx context.Context, data, sig []byte) error {
144-
143+
func (n badverifier) Verify(_ context.Context, data, sig []byte) error {
145144
if len(data) != len(sig) {
146145
return errLength
147146
}
@@ -186,7 +185,7 @@ func TestNilSign(t *testing.T) {
186185

187186
pae := PAE(payloadType, payload)
188187
want := Envelope{
189-
Payload: base64.StdEncoding.EncodeToString([]byte(payload)),
188+
Payload: base64.StdEncoding.EncodeToString(payload),
190189
PayloadType: payloadType,
191190
Signatures: []Signature{
192191
{
@@ -200,7 +199,7 @@ func TestNilSign(t *testing.T) {
200199
signer, err := NewEnvelopeSigner(ns)
201200
assert.Nil(t, err, "unexpected error")
202201

203-
got, err := signer.SignPayload(context.TODO(), payloadType, []byte(payload))
202+
got, err := signer.SignPayload(context.TODO(), payloadType, payload)
204203
assert.Nil(t, err, "sign failed")
205204
assert.Equal(t, &want, got, "bad signature")
206205
}
@@ -253,7 +252,7 @@ type ecdsaSignerVerifier struct {
253252
verified bool
254253
}
255254

256-
func (es *ecdsaSignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
255+
func (es *ecdsaSignerVerifier) Sign(_ context.Context, data []byte) ([]byte, error) {
257256
// Data is complete message, hash it and sign the digest
258257
digest := sha256.Sum256(data)
259258
r, s, err := rfc6979.SignECDSA(es.key, digest[:], sha256.New)
@@ -264,12 +263,12 @@ func (es *ecdsaSignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, e
264263
rb := r.Bytes()
265264
sb := s.Bytes()
266265
es.rLen = len(rb)
267-
rawSig := append(rb, sb...)
266+
rawSig := append(rb, sb...) //nolint:gocritic
268267

269268
return rawSig, nil
270269
}
271270

272-
func (es *ecdsaSignerVerifier) Verify(ctx context.Context, data, sig []byte) error {
271+
func (es *ecdsaSignerVerifier) Verify(_ context.Context, data, sig []byte) error {
273272
var r big.Int
274273
var s big.Int
275274
digest := sha256.Sum256(data)

dsse/verify.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ func (ev *EnvelopeVerifier) Verify(ctx context.Context, e *Envelope) ([]Accepted
4343
// If *any* signature is found to be incorrect, it is skipped
4444
var acceptedKeys []AcceptedKey
4545
usedKeyids := make(map[string]string)
46-
unverified_providers := make([]Verifier, len(ev.providers))
47-
copy(unverified_providers, ev.providers)
46+
unverifiedProviders := make([]Verifier, len(ev.providers))
47+
copy(unverifiedProviders, ev.providers)
4848
for _, s := range e.Signatures {
4949
sig, err := b64Decode(s.Sig)
5050
if err != nil {
@@ -55,7 +55,7 @@ func (ev *EnvelopeVerifier) Verify(ctx context.Context, e *Envelope) ([]Accepted
5555
// If provider and signature include key IDs but do not match skip.
5656
// If a provider recognizes the key, we exit
5757
// the loop and use the result.
58-
providers := unverified_providers
58+
providers := unverifiedProviders
5959
for i, v := range providers {
6060
keyID, err := v.KeyID()
6161

@@ -81,7 +81,7 @@ func (ev *EnvelopeVerifier) Verify(ctx context.Context, e *Envelope) ([]Accepted
8181
KeyID: keyID,
8282
Sig: s,
8383
}
84-
unverified_providers = removeIndex(providers, i)
84+
unverifiedProviders = removeIndex(providers, i)
8585

8686
// See https://github.com/in-toto/in-toto/pull/251
8787
if _, ok := usedKeyids[keyID]; ok {

dsse/verify_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type mockVerifier struct {
2323
returnErr error
2424
}
2525

26-
func (m *mockVerifier) Verify(ctx context.Context, data, sig []byte) error {
26+
func (m *mockVerifier) Verify(_ context.Context, _, _ []byte) error {
2727
if m.returnErr != nil {
2828
return m.returnErr
2929
}
@@ -71,7 +71,6 @@ func TestVerify(t *testing.T) {
7171

7272
// Now verify
7373
assert.Error(t, err)
74-
7574
}
7675

7776
func TestVerifyOneProvider(t *testing.T) {
@@ -247,11 +246,11 @@ type interceptSignerVerifier struct {
247246
verifyCalled bool
248247
}
249248

250-
func (i *interceptSignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
249+
func (i *interceptSignerVerifier) Sign(_ context.Context, data []byte) ([]byte, error) {
251250
return data, nil
252251
}
253252

254-
func (i *interceptSignerVerifier) Verify(ctx context.Context, data, sig []byte) error {
253+
func (i *interceptSignerVerifier) Verify(_ context.Context, _, _ []byte) error {
255254
i.verifyCalled = true
256255

257256
if i.verifyRes {

signerverifier/ecdsa.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewECDSASignerVerifierFromSSLibKey(key *SSLibKey) (*ECDSASignerVerifier, er
5757
}
5858

5959
// Sign creates a signature for `data`.
60-
func (sv *ECDSASignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
60+
func (sv *ECDSASignerVerifier) Sign(_ context.Context, data []byte) ([]byte, error) {
6161
if sv.private == nil {
6262
return nil, ErrNotPrivateKey
6363
}
@@ -68,7 +68,7 @@ func (sv *ECDSASignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, e
6868
}
6969

7070
// Verify verifies the `sig` value passed in against `data`.
71-
func (sv *ECDSASignerVerifier) Verify(ctx context.Context, data []byte, sig []byte) error {
71+
func (sv *ECDSASignerVerifier) Verify(_ context.Context, data []byte, sig []byte) error {
7272
hashedData := getECDSAHashedData(data, sv.curveSize)
7373

7474
if ok := ecdsa.VerifyASN1(sv.public, hashedData, sig); !ok {
@@ -93,8 +93,7 @@ func (sv *ECDSASignerVerifier) Public() crypto.PublicKey {
9393
// LoadECDSAKeyFromFile returns an SSLibKey instance for an ECDSA key stored in
9494
// a file in the custom securesystemslib format.
9595
//
96-
// Deprecated: use LoadKey(). The custom serialization format has been
97-
// deprecated. Use
96+
// Deprecated: use LoadKey(). The custom serialization format is deprecated. Use
9897
// https://github.com/secure-systems-lab/securesystemslib/blob/main/docs/migrate_key.py
9998
// to convert your key.
10099
func LoadECDSAKeyFromFile(path string) (*SSLibKey, error) {

signerverifier/ed25519.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewED25519SignerVerifierFromSSLibKey(key *SSLibKey) (*ED25519SignerVerifier
5757
}
5858

5959
// Sign creates a signature for `data`.
60-
func (sv *ED25519SignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
60+
func (sv *ED25519SignerVerifier) Sign(_ context.Context, data []byte) ([]byte, error) {
6161
if len(sv.private) == 0 {
6262
return nil, ErrNotPrivateKey
6363
}
@@ -67,7 +67,7 @@ func (sv *ED25519SignerVerifier) Sign(ctx context.Context, data []byte) ([]byte,
6767
}
6868

6969
// Verify verifies the `sig` value passed in against `data`.
70-
func (sv *ED25519SignerVerifier) Verify(ctx context.Context, data []byte, sig []byte) error {
70+
func (sv *ED25519SignerVerifier) Verify(_ context.Context, data []byte, sig []byte) error {
7171
if ok := ed25519.Verify(sv.public, data, sig); ok {
7272
return nil
7373
}
@@ -89,8 +89,7 @@ func (sv *ED25519SignerVerifier) Public() crypto.PublicKey {
8989
// LoadED25519KeyFromFile returns an SSLibKey instance for an ED25519 key stored
9090
// in a file in the custom securesystemslib format.
9191
//
92-
// Deprecated: use LoadKey(). The custom serialization format has been
93-
// deprecated. Use
92+
// Deprecated: use LoadKey(). The custom serialization format is deprecated. Use
9493
// https://github.com/secure-systems-lab/securesystemslib/blob/main/docs/migrate_key.py
9594
// to convert your key.
9695
func LoadED25519KeyFromFile(path string) (*SSLibKey, error) {

signerverifier/rsa.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func NewRSAPSSSignerVerifierFromSSLibKey(key *SSLibKey) (*RSAPSSSignerVerifier,
5959
}
6060

6161
// Sign creates a signature for `data`.
62-
func (sv *RSAPSSSignerVerifier) Sign(ctx context.Context, data []byte) ([]byte, error) {
62+
func (sv *RSAPSSSignerVerifier) Sign(_ context.Context, data []byte) ([]byte, error) {
6363
if sv.private == nil {
6464
return nil, ErrNotPrivateKey
6565
}
@@ -70,7 +70,7 @@ func (sv *RSAPSSSignerVerifier) Sign(ctx context.Context, data []byte) ([]byte,
7070
}
7171

7272
// Verify verifies the `sig` value passed in against `data`.
73-
func (sv *RSAPSSSignerVerifier) Verify(ctx context.Context, data []byte, sig []byte) error {
73+
func (sv *RSAPSSSignerVerifier) Verify(_ context.Context, data []byte, sig []byte) error {
7474
hashedData := hashBeforeSigning(data, sha256.New())
7575

7676
if err := rsa.VerifyPSS(sv.public, crypto.SHA256, hashedData, sig, &rsa.PSSOptions{SaltLength: sha256.Size, Hash: crypto.SHA256}); err != nil {
@@ -95,8 +95,7 @@ func (sv *RSAPSSSignerVerifier) Public() crypto.PublicKey {
9595
// LoadRSAPSSKeyFromFile returns an SSLibKey instance for an RSA key stored in a
9696
// file.
9797
//
98-
// Deprecated: use LoadKey(). The custom serialization format has been
99-
// deprecated. Use
98+
// Deprecated: use LoadKey(). The custom serialization format is deprecated. Use
10099
// https://github.com/secure-systems-lab/securesystemslib/blob/main/docs/migrate_key.py
101100
// to convert your key.
102101
func LoadRSAPSSKeyFromFile(path string) (*SSLibKey, error) {

signerverifier/rsa_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestLoadRSAPSSKeyFromFile(t *testing.T) {
5050

5151
assert.Equal(t, "4e8d20af09fcaed6c388a186427f94a5f7ff5591ec295f4aab2cff49ffe39e9b", key.KeyID)
5252
assert.Equal(t, "-----BEGIN PUBLIC KEY-----\nMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA04egZRic+dZMVtiQc56D\nejU4FF1q3aOkUKnD+Q4lTbj1zp6ODKJTcktupmrad68j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2jmuIOqI2zCOqX67\nI+YQsJgrHE0TmYxxRkgeYUy7s5DoHE25rfvdy5Lx+xAOH8ZgD1SGOw==\n-----END RSA PRIVATE KEY-----" //nolint:gosec
5454
assert.Equal(t, expectedPrivateKey, key.KeyVal.Private)
5555
assert.Equal(t, RSAKeyScheme, key.Scheme)
5656
assert.Equal(t, RSAKeyType, key.KeyType)

0 commit comments

Comments
 (0)