| line |
true |
false |
branch |
|
60
|
72 |
637 |
if (lc $field_name eq "dkim-signature") |
|
66
|
1 |
71 |
unless (eval {
do {
local $SIG{'__DIE__'};
my $signature = "Mail::DKIM::Signature"->parse($line);
$self->add_signature($signature);
1
}
}) |
|
78
|
17 |
692 |
if (lc $field_name eq "domainkey-signature") |
|
84
|
0 |
17 |
unless (eval {
do {
local $SIG{'__DIE__'};
my $signature = "Mail::DKIM::DkSignature"->parse($line);
$self->add_signature($signature);
1
}
}) |
|
99
|
0 |
88 |
unless @_ == 1 |
|
103
|
1 |
87 |
if ($self->{'verify_time'}) |
|
109
|
0 |
88 |
if @{$self->{'signatures'};} > $MAX_SIGNATURES_TO_PROCESS |
|
113
|
14 |
74 |
unless ($self->check_signature($signature)) |
|
130
|
59 |
15 |
if ($algorithm->wants_pre_signature_headers) |
|
146
|
0 |
88 |
unless @_ == 1 |
|
149
|
1 |
87 |
unless ($signature->check_version) |
|
152
|
1 |
0 |
if (defined $signature->version) { } |
|
162
|
2 |
85 |
unless ($signature->algorithm and $signature->get_algorithm_class($signature->algorithm)) |
|
167
|
2 |
0 |
if (defined $signature->algorithm) |
|
173
|
4 |
81 |
if ($self->{'Strict'}) |
|
174
|
2 |
2 |
if ($signature->algorithm eq "rsa-sha1") |
|
176
|
2 |
0 |
if (defined $signature->algorithm) |
|
183
|
2 |
81 |
unless ($signature->check_canonicalization) |
|
187
|
2 |
0 |
if (defined $signature->canonicalization) |
|
194
|
4 |
77 |
unless ($signature->check_protocol) |
|
198
|
0 |
4 |
!defined($signature->protocol) ? : |
|
204
|
3 |
74 |
unless ($signature->check_expiration) |
|
211
|
0 |
74 |
unless (defined $signature->domain) |
|
218
|
0 |
74 |
if ($signature->domain eq "") |
|
225
|
0 |
74 |
unless (defined $signature->selector) |
|
237
|
0 |
60 |
unless @_ == 2 |
|
262
|
5 |
53 |
if $@ |
|
264
|
7 |
53 |
unless (eval {
do {
local $SIG{'__DIE__'};
$@ = undef;
$result = $public_key->check_hash_algorithm($signature->hash_algorithm);
my $empty_g_means_wildcard = $signature->isa("Mail::DKIM::DkSignature");
$result &&= $public_key->check_granularity($signature->identity, $empty_g_means_wildcard);
die $@ if $@;
1
}
}) |
|
280
|
74 |
0 |
if (defined $i and $i =~ /\@([^\@]*)$/) |
|
287
|
0 |
74 |
unless @_ == 2 |
|
304
|
1 |
82 |
if (@{$self->{'signatures'};} == 0 and not defined $self->{'signature_reject_reason'}) |
|
321
|
13 |
69 |
if (@{$self->{'algorithms'};} == 0 and @{$self->{'signatures'};} > 0) |
|
337
|
3 |
71 |
unless (check_signature_identity($signature)) |
|
345
|
11 |
60 |
unless (eval {
do {
$pkey = $signature->get_public_key;
1
}
}) |
|
352
|
7 |
53 |
unless ($self->check_public_key($signature, $pkey)) |
|
358
|
50 |
3 |
if ($k eq "rsa") |
|
361
|
1 |
26 |
if ($keysize < 1024 and $self->{'Strict'}) |
|
372
|
40 |
10 |
$algorithm->verify ? : |
|
375
|
2 |
50 |
unless (eval {
do {
$result = $algorithm->verify ? "pass" : "fail";
$details = $algorithm->{'verification_details'} || $@;
1
}
}) |
|
379
|
2 |
0 |
if ($E =~ /(OpenSSL error: .*?) at /) { } |
|
|
0 |
0 |
elsif ($E =~ /^(panic:.*?) at /) { } |
|
|
0 |
0 |
elsif ($E =~ /^FATAL: (.*) at /) { } |
|
412
|
71 |
3 |
if (not $self->{'result'} or $result eq "pass") |
|
425
|
0 |
0 |
unless $self->{'headers_by_name'}{'from'} |
|
478
|
0 |
0 |
$sender_policy ? : |
|
|
0 |
0 |
$author_policy ? : |
|
489
|
0 |
4 |
if @_ |