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
|
isGit := false
|
||||||
magicHeader := []byte("SSHSIG\x00\x00\x00\x03git")
|
magicHeader := []byte("SSHSIG\x00\x00\x00\x03git")
|
||||||
if bytes.HasPrefix(data, magicHeader) {
|
if bytes.HasPrefix(data, magicHeader) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user