Compare commits

...

4 commits

Author SHA1 Message Date
Simon Vieille 53be613099 Merge branch 'master' into develop 2023-11-03 13:41:03 +01:00
Simon Vieille 1dc4a47320
update parser with new version of check_ssl_cert 2023-11-03 13:40:53 +01:00
Simon Vieille 059300dde6
update check_ssl_cert 2023-11-03 13:40:41 +01:00
Simon Vieille e9af453f57
add doc 2020-02-24 12:03:31 +01:00
4 changed files with 7 additions and 7 deletions

View file

@ -8,9 +8,9 @@ Checks the expiration dates of domains et HTTPS certificates.
PHP 7.3, [composer](https://getcomposer.org/), `whois` and `openssl` required.
```text
$ git clone --recurse-submodules https://gitnet.fr/deblan/domain-expiration.git
$ cd domain-expiration
$ composer install
git clone --recurse-submodules https://gitnet.fr/deblan/domain-expiration.git
cd domain-expiration
composer install
```
```text

@ -1 +1 @@
Subproject commit 0af396b41a5dc159e31689812bdbdd0203394cfd
Subproject commit 3935a6d0ac8239bde3207d2a39681db0e6d517d4

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