blib/lib/Crypt/SSLeay/X509.pm

filter: Statementstmt 28.5% 4 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 1 / 4 Podpod 0.0% 0 / 3 totaltotal 21.7% 5 / 23 CC 2 SCAR 12.2
CC
2
Cov
25%
not_string2time
6.0
not_before
2.0
not_after
2.0
CRAP 3.4
« blib/lib/Crypt/SSLeay/MainContext.pm ↑ Summary blib/lib/Crypt/SSLeay.pm »
1 package Crypt::SSLeay::X509;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 0 ▶sub not_before {
Subroutine not_before: not called CC=1 SCAR=6.9
Pod undocumented
6 0 my $cert = shift;
7 0 not_string2time($cert->get_notBeforeString);
8 }
9  
10 0 ▶sub not_after {
Subroutine not_after: not called CC=1 SCAR=6.9
Pod undocumented
11 0 my $cert = shift;
12 0 not_string2time($cert->get_notAfterString);
13 }
14  
15 0 ▶sub not_string2time {
Subroutine not_string2time: not called CC=2 SCAR=17.9
Pod undocumented
16 0 my $string = shift;
17 # $string has the form 021019235959Z
18 0 my($year, $month, $day, $hour, $minute, $second, $GMT)=
19 $string=~m/(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(Z)?/;
20 0 $year += 2000;
21 0 my $time="$year-$month-$day $hour:$minute:$second";
22 0 ▶ $time .= " GMT" if $GMT;
Branch: 1 branch
BranchTrueFalseTotal
if $GMT 0 0 0
23 0 $time;
24 }
25  
26 3 1;
« blib/lib/Crypt/SSLeay/MainContext.pm ↑ Summary blib/lib/Crypt/SSLeay.pm »