mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
certificate status exception
This commit is contained in:
parent
6f1d2d094a
commit
62b391ef68
4 changed files with 20 additions and 2 deletions
|
|
@ -10,6 +10,8 @@ interface Adapter
|
|||
|
||||
public function isInstantGeneration(string $domain, ?string $domainType): bool;
|
||||
|
||||
public function getCertificateStatus(string $domain, ?string $domainType): string;
|
||||
|
||||
public function isRenewRequired(string $domain, ?string $domainType, Log $log): bool;
|
||||
|
||||
public function deleteCertificate(string $domain): void;
|
||||
|
|
|
|||
10
src/Appwrite/Certificates/Exception/CertificateStatus.php
Normal file
10
src/Appwrite/Certificates/Exception/CertificateStatus.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Certificates\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
// Exception thrown during certificate status retrieval
|
||||
class CertificateStatus extends Exception
|
||||
{
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Appwrite\Certificates;
|
||||
|
||||
use Appwrite\Certificates\Exceptions\CertificateStatus as CertificateStatusException;
|
||||
use Exception;
|
||||
use Utopia\App;
|
||||
use Utopia\CLI\Console;
|
||||
|
|
@ -89,6 +90,11 @@ class LetsEncrypt implements Adapter
|
|||
return true;
|
||||
}
|
||||
|
||||
public function getCertificateStatus(string $domain, ?string $domainType): string
|
||||
{
|
||||
throw new CertificateStatusException('Certificate status retrieval is not supported for LetsEncrypt.');
|
||||
}
|
||||
|
||||
public function isRenewRequired(string $domain, ?string $domainType, Log $log): bool
|
||||
{
|
||||
$certPath = APP_STORAGE_CERTIFICATES . '/' . $domain . '/cert.pem';
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ class MaintenanceRules extends Action
|
|||
|
||||
public function action(Database $dbForPlatform, Certificate $queueForCertificates): void
|
||||
{
|
||||
Console::title('Interval V1');
|
||||
Console::success(APP_NAME . ' interval process v1 has started');
|
||||
Console::title('Rule maintenance V1');
|
||||
Console::success(APP_NAME . ' rule maintenance process v1 has started');
|
||||
|
||||
$intervalRuleDomainVerification = (int) System::getEnv('_APP_MAINTENANCE_RULE_DOMAIN_VERIFICATION_INTERVAL', '60'); // 1 minute
|
||||
$intervalRuleCertificateRenewal = (int) System::getEnv('_APP_MAINTENANCE_RULE_CERTIFICATE_RENEWAL_INTERVAL', '86400'); // 1 day
|
||||
|
|
|
|||
Loading…
Reference in a new issue