File Coverage

blib/lib/WebService/SSLLabs/Cert.pm
Criterion Covered Total %
statement 9 58 15.5
branch 0 4 0.0
condition n/a
subroutine 3 23 13.0
pod 20 20 100.0
total 32 105 30.4


line stmt bran cond sub pod time code
1             package WebService::SSLLabs::Cert;
2              
3 3     3   18 use strict;
  3         6  
  3         85  
4 3     3   13 use warnings;
  3         6  
  3         63  
5 3     3   14 use URI();
  3         6  
  3         2003  
6              
7             our $VERSION = '0.33';
8              
9             sub new {
10 0     0 1   my ( $class, $json ) = @_;
11 0           my $self = $json;
12 0           bless $self, $class;
13 0           return $self;
14             }
15              
16             sub alt_names {
17 0     0 1   my ($self) = @_;
18 0           return @{ $self->{altNames} };
  0            
19             }
20              
21             sub issuer_subject {
22 0     0 1   my ($self) = @_;
23 0           return $self->{issuerSubject};
24             }
25              
26             sub issues {
27 0     0 1   my ($self) = @_;
28 0           return $self->{issues};
29             }
30              
31             sub ocsp_revocation_status {
32 0     0 1   my ($self) = @_;
33 0           return $self->{ocspRevocationStatus};
34             }
35              
36             sub ocsp_uris {
37 0     0 1   my ($self) = @_;
38 0           return map { URI->new($_) } @{ $self->{ocspURIs} };
  0            
  0            
39             }
40              
41             sub revocation_info {
42 0     0 1   my ($self) = @_;
43 0           return $self->{revocationInfo};
44             }
45              
46             sub sgc {
47 0     0 1   my ($self) = @_;
48 0 0         return $self->{sgc} ? 1 : 0;
49             }
50              
51             sub validation_type {
52 0     0 1   my ($self) = @_;
53 0           return $self->{validationType};
54             }
55              
56             sub sct {
57 0     0 1   my ($self) = @_;
58 0 0         return $self->{sct} ? 1 : 0;
59             }
60              
61             sub sig_alg {
62 0     0 1   my ($self) = @_;
63 0           return $self->{sigAlg};
64             }
65              
66             sub common_names {
67 0     0 1   my ($self) = @_;
68 0           return map { URI->new($_) } @{ $self->{commonNames} };
  0            
  0            
69             }
70              
71             sub crl_uris {
72 0     0 1   my ($self) = @_;
73 0           return map { URI->new($_) } @{ $self->{crlURIs} };
  0            
  0            
74             }
75              
76             sub issuer_label {
77 0     0 1   my ($self) = @_;
78 0           return $self->{issuerLabel};
79             }
80              
81             sub subject {
82 0     0 1   my ($self) = @_;
83 0           return $self->{subject};
84             }
85              
86             sub not_before {
87 0     0 1   my ($self) = @_;
88 0           return $self->{notBefore};
89             }
90              
91             sub revocation_status {
92 0     0 1   my ($self) = @_;
93 0           return $self->{revocationStatus};
94             }
95              
96             sub not_after {
97 0     0 1   my ($self) = @_;
98 0           return $self->{notAfter};
99             }
100              
101             sub crl_revocation_status {
102 0     0 1   my ($self) = @_;
103 0           return $self->{crlRevocationStatus};
104             }
105              
106             sub must_staple {
107 0     0 1   my ($self) = @_;
108 0           return $self->{mustStaple};
109             }
110              
111             1;
112             __END__