summaryrefslogtreecommitdiffstats
path: root/plugins/sslutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sslutils.c')
-rw-r--r--plugins/sslutils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/sslutils.c b/plugins/sslutils.c
index 76e45079..c9882c69 100644
--- a/plugins/sslutils.c
+++ b/plugins/sslutils.c
@@ -209,7 +209,8 @@ int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit){
209 (tm->data[6 + offset] - '0') * 10 + (tm->data[7 + offset] - '0'); 209 (tm->data[6 + offset] - '0') * 10 + (tm->data[7 + offset] - '0');
210 stamp.tm_min = 210 stamp.tm_min =
211 (tm->data[8 + offset] - '0') * 10 + (tm->data[9 + offset] - '0'); 211 (tm->data[8 + offset] - '0') * 10 + (tm->data[9 + offset] - '0');
212 stamp.tm_sec = 0; 212 stamp.tm_sec =
213 (tm->data[10 + offset] - '0') * 10 + (tm->data[11 + offset] - '0');
213 stamp.tm_isdst = -1; 214 stamp.tm_isdst = -1;
214 215
215 time_left = difftime(timegm(&stamp), time(NULL)); 216 time_left = difftime(timegm(&stamp), time(NULL));
@@ -231,7 +232,7 @@ int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit){
231 232
232 printf (_("%s - Certificate '%s' expires in %u %s (%s)\n"), 233 printf (_("%s - Certificate '%s' expires in %u %s (%s)\n"),
233 (days_left>days_till_exp_crit) ? "WARNING" : "CRITICAL", cn, time_remaining, 234 (days_left>days_till_exp_crit) ? "WARNING" : "CRITICAL", cn, time_remaining,
234 time_left > 3600 ? "hours" : "minutes", timestamp); 235 time_left >= 3600 ? "hours" : "minutes", timestamp);
235 236
236 if ( days_left > days_till_exp_crit) 237 if ( days_left > days_till_exp_crit)
237 status = STATE_WARNING; 238 status = STATE_WARNING;