mirror of
https://github.com/distribution/distribution.git
synced 2025-09-03 16:05:51 +00:00
Remove named returns and fix linting woes
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
@@ -212,9 +212,8 @@ func verifyCertChain(header jose.Header, roots *x509.CertPool) (signingKey crypt
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func verifyJWK(header jose.Header, verifyOpts VerifyOptions) (signingKey crypto.PublicKey, err error) {
|
func verifyJWK(header jose.Header, verifyOpts VerifyOptions) (crypto.PublicKey, error) {
|
||||||
jwk := header.JSONWebKey
|
jwk := header.JSONWebKey
|
||||||
signingKey = jwk.Key
|
|
||||||
|
|
||||||
// Check to see if the key includes a certificate chain.
|
// Check to see if the key includes a certificate chain.
|
||||||
if len(jwk.Certificates) == 0 {
|
if len(jwk.Certificates) == 0 {
|
||||||
@@ -246,9 +245,8 @@ func verifyJWK(header jose.Header, verifyOpts VerifyOptions) (signingKey crypto.
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
signingKey = getCertPubKey(chains)
|
|
||||||
|
|
||||||
return
|
return getCertPubKey(chains), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCertPubKey(chains [][]*x509.Certificate) crypto.PublicKey {
|
func getCertPubKey(chains [][]*x509.Certificate) crypto.PublicKey {
|
||||||
|
Reference in New Issue
Block a user