Skip to content

Commit 53c3826

Browse files
committed
Remove named returns and fix linting woes
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
1 parent f4a500c commit 53c3826

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

registry/auth/token/token.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,8 @@ func verifyCertChain(header jose.Header, roots *x509.CertPool) (signingKey crypt
212212
return
213213
}
214214

215-
func verifyJWK(header jose.Header, verifyOpts VerifyOptions) (signingKey crypto.PublicKey, err error) {
215+
func verifyJWK(header jose.Header, verifyOpts VerifyOptions) (crypto.PublicKey, error) {
216216
jwk := header.JSONWebKey
217-
signingKey = jwk.Key
218217

219218
// Check to see if the key includes a certificate chain.
220219
if len(jwk.Certificates) == 0 {
@@ -246,9 +245,8 @@ func verifyJWK(header jose.Header, verifyOpts VerifyOptions) (signingKey crypto.
246245
if err != nil {
247246
return nil, err
248247
}
249-
signingKey = getCertPubKey(chains)
250248

251-
return
249+
return getCertPubKey(chains), nil
252250
}
253251

254252
func getCertPubKey(chains [][]*x509.Certificate) crypto.PublicKey {

0 commit comments

Comments
 (0)