Merge pull request #70611 from yagonobre/rsa

Fix error wrap on pki_helpers
pull/58/head
k8s-ci-robot 2018-11-03 11:05:14 -07:00 committed by GitHub
commit 14120dd44a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -201,7 +201,7 @@ func TryLoadKeyFromDisk(pkiPath, name string) (*rsa.PrivateKey, error) {
case *rsa.PrivateKey:
key = k
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
@ -228,7 +228,7 @@ func TryLoadPrivatePublicKeyFromDisk(pkiPath, name string) (*rsa.PrivateKey, *rs
// Allow RSA format only
k, ok := privKey.(*rsa.PrivateKey)
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)