|
@@ -26,19 +26,19 @@ |
|
|
block discarded – undo |
|
26
|
26
|
$validTo = date('d.m.Y H:i:s', $certInfo['validTo_time_t']); |
|
27
|
27
|
|
|
28
|
28
|
if ($certInfo['validFrom_time_t'] > time() || $certInfo['validTo_time_t'] < time()) { |
|
29
|
|
- $errorMessage = 'Certificate is expired. [' . $validFrom . ' - ' . $validTo . ']'; |
|
|
29
|
+ $errorMessage = 'Certificate is expired. ['.$validFrom.' - '.$validTo.']'; |
|
30
|
30
|
|
|
31
|
31
|
$result = new CheckResult(CheckResult::STATUS_FAILURE, $errorMessage); |
|
32
|
32
|
$result->addAttribute(new Attribute('certificate information', json_encode($certInfo), true)); |
|
33
|
33
|
return $result; |
|
34
|
|
- } elseif ($certInfo['validTo_time_t'] < strtotime('+' . $this->expireWarningTime . 'days')) { |
|
35
|
|
- $errorMessage = 'Certificate warning, expires in less than ' . $this->expireWarningTime . ' days. Certificate expires at: ' . $validTo; |
|
|
34
|
+ } elseif ($certInfo['validTo_time_t'] < strtotime('+'.$this->expireWarningTime.'days')) { |
|
|
35
|
+ $errorMessage = 'Certificate warning, expires in less than '.$this->expireWarningTime.' days. Certificate expires at: '.$validTo; |
|
36
|
36
|
|
|
37
|
37
|
$result = new CheckResult(CheckResult::STATUS_FAILURE, $errorMessage); |
|
38
|
38
|
$result->addAttribute(new Attribute('certificate information', json_encode($certInfo), true)); |
|
39
|
39
|
return $result; |
|
40
|
40
|
} |
|
41
|
41
|
|
|
42
|
|
- return new CheckResult(CheckResult::STATUS_SUCCESS, 'The certificate does not expire within the next ' . $this->expireWarningTime . ' days. Expire date: ' . $validTo . '.'); |
|
|
42
|
+ return new CheckResult(CheckResult::STATUS_SUCCESS, 'The certificate does not expire within the next '.$this->expireWarningTime.' days. Expire date: '.$validTo.'.'); |
|
43
|
43
|
} |
|
44
|
44
|
} |
Please login to merge, or discard this patch.