remove unnecessary parse raw
This commit is contained in:
parent
0632dff3f8
commit
c8b1f2369e
1 changed files with 1 additions and 6 deletions
|
@ -147,12 +147,7 @@ func (s SignatureData) Bytes() []byte {
|
||||||
|
|
||||||
// SignData takes a SignatureData object and signs it with a raw private key
|
// SignData takes a SignatureData object and signs it with a raw private key
|
||||||
func (s SignatureData) Sign(rawKey []byte) (string, error) {
|
func (s SignatureData) Sign(rawKey []byte) (string, error) {
|
||||||
privateKey, err := ssh.ParseRawPrivateKey(rawKey)
|
signer, err := ssh.ParsePrivateKey(rawKey)
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
signer, err := ssh.NewSignerFromKey(privateKey)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue