Fix some of the docblocks

This commit is contained in:
Mathieu Trossevin 2023-10-31 10:23:32 +01:00
parent e76ea90d89
commit c9768fef8b
Signed by: mtrossevin
GPG key ID: D1DBB7EA828374E9
2 changed files with 19 additions and 7 deletions

View file

@ -48,6 +48,12 @@ function is_superadmin() {
}
}
/**
* execute a command with sudo
* @param string $cmd The command that will be executed.
* @param ?array $output see $output parameter of exec().
* @param ?int $return_var see $result_code parameter of exec().
*/
function sudoexec($cmd, &$output, &$return_var) {
global $conf;

View file

@ -30,7 +30,7 @@ class LetsEncrypt
/**
* generate a CSR
* @param string $vhost
* @param Array $domains
* @param array $domains
* @return boolean
*/
public function makeCsr($vhost, $domains)
@ -69,7 +69,7 @@ class LetsEncrypt
/**
* perform a cURL call on the remote resource
* the cURL call follows redirections
* @param Array $domains list of domains
* @param array $domains list of domains
* @return boolean
*/
public function checkRemoteResourceAvailability($domain)
@ -108,8 +108,8 @@ class LetsEncrypt
/**
* Query the corresponding IP for each domain
* @param Array $domains list of HTTP checked domains
* @return Array $valid_dns_domains list of valid domains
* @param array $domains list of HTTP checked domains
* @return array $valid_dns_domains list of valid domains
*/
public function checkDNSValidity($domains)
{
@ -151,7 +151,7 @@ class LetsEncrypt
/**
* Retrieve the SSL certificate from the URL
* @param string $domain
* @return Array|false $cont list of parameters of the certificate, or false
* @return array|false $cont list of parameters of the certificate, or false
*/
public function getCertificate($domain)
{
@ -164,8 +164,8 @@ class LetsEncrypt
/**
* Parse the certificat arguments and extract data
* @param Array $certificateParameters certificat arguments
* @return Array $infosCert contains only the issuer, domains and expiration date
* @param array $certificateParameters certificat arguments
* @return array $infosCert contains only the issuer, domains and expiration date
*/
public function parseCertificate($certificateParameters)
{
@ -204,6 +204,12 @@ class LetsEncrypt
return ($timestampCertValidUntil > $currentDate) ? true : false;
}
/**
* Check if the requested domain is included in the certificate
* @param string $domainRequested
* @param array|string $san
* @return bool
*/
public function isDomainIncludedInCert($domainRequested, $san)
{
$san = preg_replace('/DNS:| DNS:/', '', $san);