Merge branch '3.0'

This commit is contained in:
terrafrost 2024-10-01 17:57:27 -05:00
commit 489ff793a7

View File

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