1 |
slords |
1.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'); |