Don't log private SSH key

Log files may have more inclusive permissions than private SSH keys, and
as such we should not log the key, even if it looks invalid.
This commit is contained in:
Tim St. Clair 2016-04-19 16:34:37 -07:00
parent 62c737324e
commit df42b984d4

View File

@ -233,7 +233,7 @@ func MakePrivateKeySignerFromFile(key string) (ssh.Signer, error) {
func MakePrivateKeySignerFromBytes(buffer []byte) (ssh.Signer, error) {
signer, err := ssh.ParsePrivateKey(buffer)
if err != nil {
return nil, fmt.Errorf("error parsing SSH key %s: '%v'", buffer, err)
return nil, fmt.Errorf("error parsing SSH key: '%v'", err)
}
return signer, nil
}