Skip to content

Commit

Permalink
Merge pull request #2374 from LibreSign/bugfix/check-if-root-certific…
Browse files Browse the repository at this point in the history
…ate-files-exists

Check if root certificate exists
  • Loading branch information
vitormattos authored Feb 28, 2024
2 parents 2e3d213 + a38e870 commit 087d168
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Handler/CertificateEngine/CfsslHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ public function isSetupOk(): bool {
if (!parent::isSetupOk()) {
return false;
};
$configPath = $this->getConfigPath();
$certificate = file_get_contents($configPath . '/ca.pem');
$privateKey = file_get_contents($configPath . '/ca-key.pem');
if (!$certificate || !$privateKey) {
return false;
}
try {
$this->getClient();
return true;
Expand Down

0 comments on commit 087d168

Please sign in to comment.