mirror of
https://github.com/quexten/goldwarden.git
synced 2024-09-11 19:17:33 +03:00
Add error on missing ssh key
This commit is contained in:
parent
1e1ec95fe3
commit
e087ffa422
@ -110,6 +110,10 @@ func (vaultAgent vaultAgent) SignWithFlags(key ssh.PublicKey, data []byte, flags
|
||||
}
|
||||
}
|
||||
|
||||
if sshKey == nil {
|
||||
return nil, errors.New("key not found")
|
||||
}
|
||||
|
||||
isGit := false
|
||||
magicHeader := []byte("SSHSIG\x00\x00\x00\x03git")
|
||||
if bytes.HasPrefix(data, magicHeader) {
|
||||
|
Loading…
Reference in New Issue
Block a user