diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2017-02-19 00:25:42 +0000 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2017-02-19 00:43:10 +0000 |
commit | e8ff7ffe8e8c25195c64950b61c6c5754bbcd3ba (patch) | |
tree | 52dd38d68c07991bbbb6b8757b0769f4c5fab20e /lib/util.go | |
parent | 19dcff5d7245295d4508a71bb0ed2a886ada7a13 (diff) |
Add grpc signer
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] } |