Noticed that when I set the interval to 12 hours, I was getting CRL’s
approximately every 4.5 hours. There is a bug in startAutoCRL. It is using
getNumericDate to convert the CRL start datetime and current datetimes to
numbers and then subtracting them to get the number of seconds that have
transpired. GetNumericDate converts the datetime Jan 3, 2011, 19:11:00 to
20110103191100. This number works for sorting dates, but not for date math. Ten
minutes later would be 20110103192100. When I subtract them I get 1000, but 10
minutes is 600 seconds.
I was able to fix the code with the following changes:
-- Add the following code to the top of the file after use strict:
use Date::Parse;
-- Modify the code that does the date calculation as follows (I moved the line
that assigns $today next to the other lines for simplicity). Note that you need
to use localtime() for current time so that the timezones will be adjusted
properly. str2time will correctly convert the GMT timezone tag from the CRL:
#my $today = gmtime();
#$numLastUpdate = $cryptoShell->getNumericDate ( $lastCRL_lastUpdate );
#$numToday = $cryptoShell->getNumericDate ( $today );
my $today = localtime();
$numLastUpdate = str2time ( $lastCRL_lastUpdate );
$numToday = str2time ( $today );
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openca-Users mailing list
Openca-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openca-users