cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Checking if certificate is expired

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Wed, 13 Sep 2006 08:21:49 -0500

On 9/13/06, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Wed, 13 Sep 2006, Marian Cerny wrote:
>
> > when CURLOPT_SSL_VERIFYPEER is set to 0, then validity period of
> > certificates is not checked too?
>
> Actually, looking at the code I'm not immediately sure how the period
> validation is done, if at all.
>
> I'd be interested to learn as well once you find out!

I'm doing cert expiry checks the hard way - grab the page with the verbose
option, grep out the "expiry date" line, convert the date to seconds using
the 'date' command, subtract today's date in seconds, divide by 86400 to get
days, if the result is less than 14 send a warning, if less than 7 send an
alert. Bourne shell all the way...

Yeah, it could be more efficient, but it only runs once per day, for about 5
minutes, so it's not much of a resource hog... :)

If anyone wants a copy, I can strip it down the essentials

Ralph Mitchell
Received on 2006-09-13

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET