mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-06 05:48:27 +00:00
SSH2: don't use AES GCM for TurboFTP Server
This commit is contained in:
parent
5b27f8f26e
commit
3ecde6bf6a
@ -1551,6 +1551,20 @@ class SSH2
|
|||||||
['hmac-sha1-96', 'hmac-md5-96']
|
['hmac-sha1-96', 'hmac-md5-96']
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case substr($this->server_identifier, 0, 24) == 'SSH-2.0-TurboFTP_SERVER_':
|
||||||
|
if (!isset($preferred['server_to_client']['crypt'])) {
|
||||||
|
$s2c_encryption_algorithms = array_values(array_diff(
|
||||||
|
$s2c_encryption_algorithms,
|
||||||
|
['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com']
|
||||||
|
));
|
||||||
|
}
|
||||||
|
if (!isset($preferred['client_to_server']['crypt'])) {
|
||||||
|
$c2s_encryption_algorithms = array_values(array_diff(
|
||||||
|
$c2s_encryption_algorithms,
|
||||||
|
['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com']
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$client_cookie = Random::string(16);
|
$client_cookie = Random::string(16);
|
||||||
@ -2315,7 +2329,7 @@ class SSH2
|
|||||||
return $this->login_helper($username, $password);
|
return $this->login_helper($username, $password);
|
||||||
}
|
}
|
||||||
$this->disconnect_helper(NET_SSH2_DISCONNECT_CONNECTION_LOST);
|
$this->disconnect_helper(NET_SSH2_DISCONNECT_CONNECTION_LOST);
|
||||||
throw new ConnectionClosedException('Connection closed by server');
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
list($type, $service) = Strings::unpackSSH2('Cs', $response);
|
list($type, $service) = Strings::unpackSSH2('Cs', $response);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user