diff --git a/lib/check_ssl_cert b/lib/check_ssl_cert index 0af396b..3935a6d 160000 --- a/lib/check_ssl_cert +++ b/lib/check_ssl_cert @@ -1 +1 @@ -Subproject commit 0af396b41a5dc159e31689812bdbdd0203394cfd +Subproject commit 3935a6d0ac8239bde3207d2a39681db0e6d517d4 diff --git a/src/Deblan/Command/CheckHttpsCertificatesCommand.php b/src/Deblan/Command/CheckHttpsCertificatesCommand.php index 384aca7..a106c59 100644 --- a/src/Deblan/Command/CheckHttpsCertificatesCommand.php +++ b/src/Deblan/Command/CheckHttpsCertificatesCommand.php @@ -104,8 +104,8 @@ EOF ]); $process->run(); - $whois = $process->getOutput(); - $parser = new Parser($whois); + $content = $process->getOutput(); + $parser = new Parser($content); $expiryDate = $parser->getExpiryDate(); if ($expiryDate) { diff --git a/src/Deblan/Parser/SslCertParser.php b/src/Deblan/Parser/SslCertParser.php index f6f6a6a..98e943a 100644 --- a/src/Deblan/Parser/SslCertParser.php +++ b/src/Deblan/Parser/SslCertParser.php @@ -31,7 +31,7 @@ class SslCertParser */ public function getExpiryDate(): ? \DateTime { - preg_match('/days=([^;]+);/', $this->check, $match); + preg_match('/expires in ([^\s]+)\s+/', $this->check, $match); if (isset($match[1])) { $days = (int) $match[1];