From 892c7ac1309dff55bbe10c1ab27dafd7f9a20904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Mon, 21 Sep 2020 20:55:00 +0200 Subject: [PATCH] adding #45 --- app/Helpers/NginxVhostHelper.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/Helpers/NginxVhostHelper.php b/app/Helpers/NginxVhostHelper.php index cdfdd98..a8f5b48 100644 --- a/app/Helpers/NginxVhostHelper.php +++ b/app/Helpers/NginxVhostHelper.php @@ -90,15 +90,13 @@ class NginxVhostHelper if (file_exists($matches[0]) && file_exists($matches[1])) { $result['ssl_certificate_exists'] = true; - } - - // getting expired - exec('openssl x509 -noout -dates -in '.$matches[0], $openssl); - var_dump($openssl); die(); + // getting expired + exec('openssl x509 -noout -dates -in '.$matches[0], $openssl); - if (isset($openssl[1])) { - $openssl = str_replace('notAfter=', '', $openssl[1]); + if (isset($openssl[1])) { + $result['ssl_certificate_expired_at'] = str_replace('notAfter=', '', $openssl[1]); + } } }