diff options
Diffstat (limited to 'lib/util.go')
-rw-r--r-- | lib/util.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.go b/lib/util.go index b1c7b87..ca88f3f 100644 --- a/lib/util.go +++ b/lib/util.go @@ -3,8 +3,8 @@ package lib import "golang.org/x/crypto/ssh" // GetPublicKey marshals a ssh certificate to a string. -func GetPublicKey(pub ssh.PublicKey) string { +func GetPublicKey(pub ssh.PublicKey) []byte { marshaled := ssh.MarshalAuthorizedKey(pub) // Strip trailing newline - return string(marshaled[:len(marshaled)-1]) + return marshaled[:len(marshaled)-1] } |