Merge branch '1.0' into 2.0

This commit is contained in:
terrafrost 2018-05-27 10:44:17 -05:00
commit b8bb23c9f1
2 changed files with 15 additions and 1 deletions

View File

@ -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);
}
}
}

View File

@ -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
*