blob: eb1900b6d9fa8b27c10b855d54935bd03e2f208d (
plain)
1
2
3
4
5
6
7
8
9
10
|
package certutil
import "golang.org/x/crypto/ssh"
// GetPublicKey marshals a ssh certificate to a string.
func GetPublicKey(cert *ssh.Certificate) string {
marshaled := ssh.MarshalAuthorizedKey(cert)
// Strip trailing newline
return string(marshaled[:len(marshaled)-1])
}
|