mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-29 04:23:34 +00:00
minor fixes to X509 and SSH2
This commit is contained in:
parent
bd489a16dc
commit
9f540a82e6
@ -3129,12 +3129,13 @@ class X509
|
|||||||
* Returns a list of all extensions in use in certificate, CSR or CRL
|
* Returns a list of all extensions in use in certificate, CSR or CRL
|
||||||
*
|
*
|
||||||
* @param array $cert optional
|
* @param array $cert optional
|
||||||
|
* @param string $path optional
|
||||||
* @access public
|
* @access public
|
||||||
* @return array
|
* @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 (is_array($rclist = $this->subArray($crl, 'tbsCertList/revokedCertificates'))) {
|
||||||
if (($i = $this->revokedCertificate($rclist, $serial)) !== false) {
|
if (($i = $this->revokedCertificate($rclist, $serial)) !== false) {
|
||||||
return $this->getExtensionsHelper($crl, "tbsCertList/revokedCertificates/$i/crlEntryExtensions");
|
return $this->getExtensions($crl, "tbsCertList/revokedCertificates/$i/crlEntryExtensions");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4236,7 +4236,7 @@ class SSH2
|
|||||||
case $r->compare($q) >= 0:
|
case $r->compare($q) >= 0:
|
||||||
case $s->equals($zero):
|
case $s->equals($zero):
|
||||||
case $s->compare($q) >= 0:
|
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');
|
throw new \RuntimeException('Invalid signature');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user