[Nagiosplug-devel] [ nagiosplug-Bugs-1864404 ] check_smtp/check_http miscalculate timezones in cert expiry

SourceForge.net noreply at sourceforge.net
Thu Mar 19 06:40:30 CET 2009


Bugs item #1864404, was opened at 2008-01-05 04:46
Message generated for change (Comment added) made by justdave72
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1864404&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: Release (specify)
>Status: Open
Resolution: Fixed
Priority: 7
Private: No
Submitted By: David Miller (justdave72)
Assigned to: Thomas Guyot-Sionnest (dermoth)
Summary: check_smtp/check_http miscalculate timezones in cert expiry

Initial Comment:
check_smtp (nagios-plugins 1.4.9) 1.59

When running check_smtp with --starttls or -S, the certificate expiration time retrieved from the certificate is always expressed in GMT, but check_smtp compares it to the local timezone instead of GMT.  For example, I'm in -0800 and my certificate expired a couple hours ago, but check_smtp claims "WARNING - Certificate expires today (01/05/2008 05:40)." instead of a CRITICAL that it's already expired.  Time on the server is Sat Jan  5 01:44:42 PST 2008 (which is 09:44 GMT, past the expiration time)

openssl s_client tells me:
    Verify return code: 10 (certificate has expired)


----------------------------------------------------------------------

>Comment By: David Miller (justdave72)
Date: 2009-03-19 01:40

Message:
Cool, thanks!  Out of curiosity, when will that code in Git hit a released
version?

----------------------------------------------------------------------

Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-03-19 01:13

Message:
Ok, I should sleep more at night...

So the problem you're describing is not caused by the timestamp, but
rather by a bug in the way time is compared. The current code in Git should
fix your problem.

I'm marking the bug as Pending. It will close itself in a week if you
don't follow up.

----------------------------------------------------------------------

Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-03-18 22:35

Message:
nevermind - It only add timestamps in the output.

I will see what I can do.

----------------------------------------------------------------------

Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-03-17 04:03

Message:
The following tracker has a patch for this:
https://sourceforge.net/support/tracker.php?aid=1939022

----------------------------------------------------------------------

Comment By: David Miller (justdave72)
Date: 2008-05-04 01:42

Message:
Logged In: YES 
user_id=648592
Originator: YES

The check_http plugin apparently makes this same error in its certificate
checking code.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1864404&group_id=29880




More information about the Devel mailing list