Branch Coverage

blib/lib/Mail/DomainKeys/Signature.pm
Criterion Covered Total %
branch 39 102 38.2


line true false branch
40 7 36 if /^a=(rsa-sha1)$/i
42 7 36 if m[^b=([A-Za-z0-9\+/\=\s]+)$]
44 7 36 if /^c=(nofws|simple)$/i
46 7 36 if /^d=([A-Za-z0-9\-\.]+)$/
48 1 42 if /^h=(.*)$/s
50 7 36 if /^q=(dns)$/i
52 7 36 if /^s=(\S+)$/
65 0 30 if ($self->signheaderlist)
67 0 0 if lc $attr eq lc $key
75 0 30 if ($self->headerlist)
77 0 0 if lc $attr eq lc $key
95 0 0 if $self->algorithm
98 0 0 if $self->headerlist
107 0 0 if (defined(my $cfws = $self->fws))
125 0 0 if $prms{'Method'}
126 0 0 if $prms{'Selector'}
127 0 0 if $prms{'Private'}
129 0 0 unless my $text = $prms{'Text'}
133 0 0 unless $self->method
137 0 0 unless $self->private
141 0 0 unless $self->selector
145 0 0 unless $self->domain
149 0 0 unless $self->protocol
150 0 0 unless $self->algorithm
156 0 0 unless $prms{'Sender'}->host =~ /(^|\.)\Q$signing_domain\E\z/i
179 0 6 unless $self->status('bad format'), $self->selector
185 0 6 unless $self->domain
189 0 6 unless ($self->public)
190 0 0 unless my $pubk = 'Mail::DomainKeys::Key::Public'->fetch('Protocol', $self->protocol, 'Selector', $self->selector, 'Domain', $self->domain)
198 0 0 if $pubk->revoked
212 0 6 unless $prms{'Sender'}->host =~ /(^|\.)\Q$signing_domain\E\z/i
216 0 6 unless $prms{'Sender'}->host eq $self->domain
220 0 6 if $self->public->granularity and $prms{'Sender'}->user ne $self->public->granularity
225 4 2 if $self->public->verify('Text', $prms{'Text'}, 'Signature', decode_base64($self->signature))
239 0 0 if @_
248 0 19 if @_
257 6 0 if @_
266 0 0 if @_
275 0 31 if @_
278 1 30 if (wantarray and $$self{'HDRS'})
289 0 15 if @_
298 6 18 if @_
307 0 0 if @_
316 0 1 if @_
325 0 7 if @_
334 0 6 if @_
343 0 36 if @_
346 0 36 if (wantarray and $$self{'SHDR'})
357 0 6 if @_
366 16 0 if @_
375 0 0 if $self->public and $self->public->testing