mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-24 20:40:57 +03:00
Fixed key storage.
This commit is contained in:
parent
d5626b7514
commit
11e92b5718
@ -27,7 +27,7 @@ func MakeAuth(auth Auth) *ssh.ServerConfig {
|
||||
return nil, err
|
||||
}
|
||||
perm := &ssh.Permissions{Extensions: map[string]string{
|
||||
"pubkey": string(ssh.MarshalAuthorizedKey(key)),
|
||||
"pubkey": string(key.Marshal()),
|
||||
}}
|
||||
return perm, nil
|
||||
},
|
||||
@ -50,7 +50,7 @@ func MakeNoAuth() *ssh.ServerConfig {
|
||||
// Auth-related things should be constant-time to avoid timing attacks.
|
||||
PublicKeyCallback: func(conn ssh.ConnMetadata, key ssh.PublicKey) (*ssh.Permissions, error) {
|
||||
perm := &ssh.Permissions{Extensions: map[string]string{
|
||||
"pubkey": string(ssh.MarshalAuthorizedKey(key)),
|
||||
"pubkey": string(key.Marshal()),
|
||||
}}
|
||||
return perm, nil
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user