minor fixes to X509 and SSH2

This commit is contained in:
terrafrost 2017-08-06 17:29:30 -05:00
parent bd489a16dc
commit 9f540a82e6
2 changed files with 5 additions and 4 deletions

View File

@ -3129,12 +3129,13 @@ class X509
* Returns a list of all extensions in use in certificate, CSR or CRL
*
* @param array $cert optional
* @param string $path optional
* @access public
* @return array
*/
public function getExtensions($cert = null)
public function getExtensions($cert = null, $path = null)
{
return $this->getExtensionsHelper($cert);
return $this->getExtensionsHelper($cert, $path);
}
/**
@ -3686,7 +3687,7 @@ class X509
if (is_array($rclist = $this->subArray($crl, 'tbsCertList/revokedCertificates'))) {
if (($i = $this->revokedCertificate($rclist, $serial)) !== false) {
return $this->getExtensionsHelper($crl, "tbsCertList/revokedCertificates/$i/crlEntryExtensions");
return $this->getExtensions($crl, "tbsCertList/revokedCertificates/$i/crlEntryExtensions");
}
}

View File

@ -4236,7 +4236,7 @@ class SSH2
case $r->compare($q) >= 0:
case $s->equals($zero):
case $s->compare($q) >= 0:
$this->disconnectHepler(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED);
$this->disconnect_helper(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED);
throw new \RuntimeException('Invalid signature');
}