remove unnecessary parse raw

This commit is contained in:
Michael Yang 2024-01-30 16:24:40 -08:00
parent 0632dff3f8
commit c8b1f2369e

View file

@ -147,12 +147,7 @@ func (s SignatureData) Bytes() []byte {
// SignData takes a SignatureData object and signs it with a raw private key
func (s SignatureData) Sign(rawKey []byte) (string, error) {
privateKey, err := ssh.ParseRawPrivateKey(rawKey)
if err != nil {
return "", err
}
signer, err := ssh.NewSignerFromKey(privateKey)
signer, err := ssh.ParsePrivateKey(rawKey)
if err != nil {
return "", err
}