mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-09-19 14:48:01 +02:00
Return empty bind response on parse throw
This commit is contained in:
@@ -142,6 +142,7 @@ extension SSHAgentInputParser {
|
|||||||
case SSHAgent.ProtocolExtension.OpenSSHExtension.domain:
|
case SSHAgent.ProtocolExtension.OpenSSHExtension.domain:
|
||||||
switch name {
|
switch name {
|
||||||
case SSHAgent.ProtocolExtension.OpenSSHExtension.sessionBind(.empty).name:
|
case SSHAgent.ProtocolExtension.OpenSSHExtension.sessionBind(.empty).name:
|
||||||
|
do {
|
||||||
let hostkeyBlob = try reader.readNextChunkAsSubReader()
|
let hostkeyBlob = try reader.readNextChunkAsSubReader()
|
||||||
let hostKeyType = try hostkeyBlob.readNextChunkAsString()
|
let hostKeyType = try hostkeyBlob.readNextChunkAsString()
|
||||||
let hostKeyData = try hostkeyBlob.readNextChunk()
|
let hostKeyData = try hostkeyBlob.readNextChunk()
|
||||||
@@ -196,6 +197,9 @@ extension SSHAgentInputParser {
|
|||||||
forwarding: forwarding
|
forwarding: forwarding
|
||||||
)
|
)
|
||||||
return .openSSH(.sessionBind(context))
|
return .openSSH(.sessionBind(context))
|
||||||
|
} catch {
|
||||||
|
return .openSSH(.sessionBind(.empty))
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return .openSSH(.unknown(String(name)))
|
return .openSSH(.unknown(String(name)))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user