sshd: Add SHA256 prefix to pubkey fingerprints (#220)

Fixes #214
This commit is contained in:
Jesse Shapiro 2016-10-22 09:49:26 -04:00 committed by Andrey Petrov
parent 55c1def24d
commit 7781d5b135
1 changed files with 1 additions and 1 deletions

View File

@ -68,5 +68,5 @@ func MakeNoAuth() *ssh.ServerConfig {
// See: https://anongit.mindrot.org/openssh.git/commit/?id=56d1c83cdd1ac
func Fingerprint(k ssh.PublicKey) string {
hash := sha256.Sum256(k.Marshal())
return base64.StdEncoding.EncodeToString(hash[:])
return "SHA256:" + base64.StdEncoding.EncodeToString(hash[:])
}