mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-13 18:02:58 +00:00
Merge branch '3.0'
This commit is contained in:
commit
489ff793a7
@ -3355,6 +3355,28 @@ class X509
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all requested CSR extensions
|
||||
*
|
||||
* Returns the list of extensions if there are any and false if not
|
||||
*
|
||||
* @param array $csr optional
|
||||
* @return mixed
|
||||
*/
|
||||
public function getRequestedCertificateExtensions(array $csr = null)
|
||||
{
|
||||
if (empty($csr)) {
|
||||
$csr = $this->currentCert;
|
||||
}
|
||||
|
||||
$requestedExtensions = $this->getAttribute('pkcs-9-at-extensionRequest');
|
||||
if ($requestedExtensions === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->getAttribute('pkcs-9-at-extensionRequest')[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all CSR attributes in use
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user