/[smeserver]/rpms/e-smith-base/sme8/e-smith-base-4.18.1-dateManip.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme8/e-smith-base-4.18.1-dateManip.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Wed Aug 20 21:22:12 2008 UTC (16 years, 2 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New dev stream

1 diff -Nur -x '*.orig' -x '*.rej' e-smith-base-4.18.1/root/etc/e-smith/templates/home/e-smith/ssl.crt mezzanine_patched_e-smith-base-4.18.1/root/etc/e-smith/templates/home/e-smith/ssl.crt
2 --- e-smith-base-4.18.1/root/etc/e-smith/templates/home/e-smith/ssl.crt 2008-03-26 10:49:00.000000000 -0600
3 +++ mezzanine_patched_e-smith-base-4.18.1/root/etc/e-smith/templates/home/e-smith/ssl.crt 2008-04-22 15:25:43.000000000 -0600
4 @@ -1,6 +1,6 @@
5 {
6 use constant KEYLIFEINDAYS => 365;
7 - use Date::Manip;
8 + use Date::Parse;
9 use Cwd;
10 my $here = getcwd;
11
12 @@ -24,9 +24,10 @@
13 {
14 my $expire = `openssl x509 -enddate -noout -in $crt`;
15 $expire =~ s/^notAfter=//;
16 - $expire =~ s#(\d{4}) (\w{3})#$2 $1#;
17 + $expire = str2time($expire);
18 + my $ttl_days = ($expire - time()) / 60 / 60 / 24;
19
20 - if ( Date_Cmp('today', ParseDate($expire)) < 0 ) {
21 + if ( $ttl_days > 2 ) {
22 my $expected_issuer = '/C=--' .
23 '/ST=----';
24 $expected_issuer .= '/L=' . ($defaultCity ? $defaultCity : 'Newbury');

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed