Unverified Commit 14120dd4 authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #70611 from yagonobre/rsa

Fix error wrap on pki_helpers
parents 474e27f9 a80a5730
...@@ -201,7 +201,7 @@ func TryLoadKeyFromDisk(pkiPath, name string) (*rsa.PrivateKey, error) { ...@@ -201,7 +201,7 @@ func TryLoadKeyFromDisk(pkiPath, name string) (*rsa.PrivateKey, error) {
case *rsa.PrivateKey: case *rsa.PrivateKey:
key = k key = k
default: default:
return nil, errors.Wrapf(err, "the private key file %s isn't in RSA format", privateKeyPath) return nil, errors.Errorf("the private key file %s isn't in RSA format", privateKeyPath)
} }
return key, nil return key, nil
...@@ -228,7 +228,7 @@ func TryLoadPrivatePublicKeyFromDisk(pkiPath, name string) (*rsa.PrivateKey, *rs ...@@ -228,7 +228,7 @@ func TryLoadPrivatePublicKeyFromDisk(pkiPath, name string) (*rsa.PrivateKey, *rs
// Allow RSA format only // Allow RSA format only
k, ok := privKey.(*rsa.PrivateKey) k, ok := privKey.(*rsa.PrivateKey)
if !ok { if !ok {
return nil, nil, errors.Wrapf(err, "the private key file %s isn't in RSA format", privateKeyPath) return nil, nil, errors.Errorf("the private key file %s isn't in RSA format", privateKeyPath)
} }
p := pubKeys[0].(*rsa.PublicKey) p := pubKeys[0].(*rsa.PublicKey)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment