mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-27 04:34:45 +01:00
SSH/Agent: add dummy setHash() method
This commit is contained in:
parent
b57976ec5f
commit
39a0b652b3
@ -202,6 +202,18 @@ class System_SSH_Agent_Identity
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Hash
|
||||||
|
*
|
||||||
|
* ssh-agent doesn't support using hashes for RSA other than SHA1
|
||||||
|
*
|
||||||
|
* @param string $hash
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
function setHash($hash)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a signature
|
* Create a signature
|
||||||
*
|
*
|
||||||
@ -330,12 +342,14 @@ class System_SSH_Agent
|
|||||||
$packet = pack('NC', 1, SYSTEM_SSH_AGENTC_REQUEST_IDENTITIES);
|
$packet = pack('NC', 1, SYSTEM_SSH_AGENTC_REQUEST_IDENTITIES);
|
||||||
if (strlen($packet) != fputs($this->fsock, $packet)) {
|
if (strlen($packet) != fputs($this->fsock, $packet)) {
|
||||||
user_error('Connection closed while requesting identities');
|
user_error('Connection closed while requesting identities');
|
||||||
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$length = current(unpack('N', fread($this->fsock, 4)));
|
$length = current(unpack('N', fread($this->fsock, 4)));
|
||||||
$type = ord(fread($this->fsock, 1));
|
$type = ord(fread($this->fsock, 1));
|
||||||
if ($type != SYSTEM_SSH_AGENT_IDENTITIES_ANSWER) {
|
if ($type != SYSTEM_SSH_AGENT_IDENTITIES_ANSWER) {
|
||||||
user_error('Unable to request identities');
|
user_error('Unable to request identities');
|
||||||
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$identities = array();
|
$identities = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user