mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-11-08 03:35:59 +01:00
1 parent
cda56ea14b
commit
9aacd73673
1 file changed
+2
-2
@@ -23,8 +23,8 @@ extension Agent {
|
||||
|
||||
public func handle(reader: FileHandleReader, writer: FileHandleWriter) {
|
||||
Logger().debug("Agent handling new data")
|
||||
let data = reader.availableData
|
||||
guard !data.isEmpty else { return }
|
||||
let data = Data(reader.availableData)
|
||||
guard data.count > 4 else { return }
|
||||
let requestTypeInt = data[4]
|
||||
guard let requestType = SSHAgent.RequestType(rawValue: requestTypeInt) else {
|
||||
writer.write(OpenSSHKeyWriter().lengthAndData(of: SSHAgent.ResponseType.agentFailure.data))
|
||||
|
||||
Reference in new issue
Block a user