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

Annotation 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.1 - (hide annotations) (download)
Tue Apr 22 21:32:04 2008 UTC (16 years, 6 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-base-4_18_1-24_el5_sme, e-smith-base-4_18_1-19_el5_sme, e-smith-base-4_18_1-17_el5_sme, e-smith-base-4_18_1-12_el5_sme, e-smith-base-4_18_1-20_el5_sme, e-smith-base-4_18_1-14_el5_sme, e-smith-base-4_18_1-16_el5_sme, e-smith-base-4_18_1-22_el5_sme, e-smith-base-4_18_1-27_el5_sme, e-smith-base-4_18_1-13_el5_sme, e-smith-base-4_18_1-23_el5_sme, e-smith-base-4_18_1-25_el5_sme, e-smith-base-4_18_1-26_el5_sme, e-smith-base-4_18_1-21_el5_sme, e-smith-base-4_18_1-11_el5_sme, e-smith-base-4_18_1-15_el5_sme, e-smith-base-4_18_1-18_el5_sme
Branch point for: e-smith-base-4_18_1-tree
* Tue Apr 22 2008 Shad L. Lords <slords@mail.com> 4.18.1-11
- Remove use of Date::Manip from ssl.crt [SME: 3155]

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');

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