for ssl-fallback-check not only check for empty value but also for existence of certificate, thx to df8oe

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2020-09-06 14:12:19 +02:00
parent 1eed3d1166
commit 4ad8b62576
4 changed files with 7 additions and 7 deletions

View File

@@ -502,7 +502,7 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
if (is_dir($certificate_folder) && file_exists($ssl_file) && is_readable($ssl_file)) {
$cert_data = openssl_x509_parse(file_get_contents($ssl_file));
if ($cert_data['validTo_time_t'] > strtotime($cert_date)) {
if ($cert_data && $cert_data['validTo_time_t'] > strtotime($cert_date)) {
return true;
}
}