update parser with new version of check_ssl_cert

This commit is contained in:
Simon Vieille 2023-11-03 13:40:53 +01:00
parent 059300dde6
commit 1dc4a47320
Signed by: deblan
GPG key ID: 579388D585F70417
2 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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];