equal
deleted
inserted
replaced
140 $c_time = DateCalc( "today", "+ $opt_c" ); |
140 $c_time = DateCalc( "today", "+ $opt_c" ); |
141 |
141 |
142 # check expire date |
142 # check expire date |
143 foreach ( sort keys %certs ) { |
143 foreach ( sort keys %certs ) { |
144 my $enddate; |
144 my $enddate; |
145 if ( @{ $certs{$_} }[1] =~ /(\w+\s+\d+\s+\d+:\d+:\d+\s+\d+)/ ) { |
145 if ( @{ $certs{$_} }[1] =~ /(\w+\s+\d+\s+\d+:\d+:\d+\s+\d+\s+(\w+)?)/ ) { |
146 $enddate = $1; |
146 $enddate = $1; |
147 } |
147 } |
148 $enddate = ParseDate($enddate); |
148 $enddate = ParseDate($enddate); |
149 unless ($enddate) { |
149 unless ($enddate) { |
150 print "CERT CRITICAL: Can't parse enddate\n"; |
150 print "CERT CRITICAL: Can't parse enddate\n"; |