mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
b8bb23c9f1
@ -155,12 +155,14 @@ class Agent
|
||||
$packet = pack('NC', 1, self::SSH_AGENTC_REQUEST_IDENTITIES);
|
||||
if (strlen($packet) != fputs($this->fsock, $packet)) {
|
||||
user_error('Connection closed while requesting identities');
|
||||
return array();
|
||||
}
|
||||
|
||||
$length = current(unpack('N', fread($this->fsock, 4)));
|
||||
$type = ord(fread($this->fsock, 1));
|
||||
if ($type != self::SSH_AGENT_IDENTITIES_ANSWER) {
|
||||
user_error('Unable to request identities');
|
||||
return array();
|
||||
}
|
||||
|
||||
$identities = array();
|
||||
@ -305,4 +307,4 @@ class Agent
|
||||
|
||||
return pack('Na*', $agent_reply_bytes, $agent_reply_data);
|
||||
}
|
||||
}
|
||||
}
|
@ -126,6 +126,18 @@ class 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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user