line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DKIM::ARC::Seal; |
2
|
3
|
|
|
3
|
|
23
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
93
|
|
3
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
126
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.20230212'; # VERSION |
5
|
|
|
|
|
|
|
# ABSTRACT: represents a ARC-Seal header |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# Copyright 2017 FastMail Pty Ltd. All Rights Reserved. |
8
|
|
|
|
|
|
|
# Bron Gondwana |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
11
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
17
|
use base 'Mail::DKIM::ARC::MessageSignature'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
5484
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
385
|
|
|
385
|
1
|
651
|
my $class = shift; |
18
|
385
|
|
|
|
|
873
|
my %prms = @_; |
19
|
385
|
|
|
|
|
733
|
my $self = {}; |
20
|
385
|
|
|
|
|
694
|
bless $self, $class; |
21
|
|
|
|
|
|
|
|
22
|
385
|
100
|
|
|
|
854
|
$self->instance( $prms{'Instance'} ) if exists $prms{'Instance'}; |
23
|
385
|
|
100
|
|
|
1884
|
$self->algorithm( $prms{'Algorithm'} || 'rsa-sha256' ); |
24
|
385
|
|
|
|
|
1513
|
$self->signature( $prms{'Signature'} ); |
25
|
385
|
50
|
|
|
|
1019
|
$self->canonicalization( $prms{'Method'} ) if exists $prms{'Method'}; |
26
|
385
|
|
100
|
|
|
1647
|
$self->chain( $prms{'Chain'} || 'none' ); |
27
|
385
|
|
|
|
|
1415
|
$self->domain( $prms{'Domain'} ); |
28
|
385
|
|
|
|
|
1478
|
$self->selector( $prms{'Selector'} ); |
29
|
|
|
|
|
|
|
$self->timestamp( |
30
|
385
|
100
|
|
|
|
1512
|
defined $prms{'Timestamp'} ? $prms{'Timestamp'} : time() ); |
31
|
385
|
50
|
|
|
|
843
|
$self->expiration( $prms{'Expiration'} ) if defined $prms{'Expiration'}; |
32
|
385
|
100
|
|
|
|
789
|
$self->key( $prms{'Key'} ) if defined $prms{'Key'}; |
33
|
|
|
|
|
|
|
|
34
|
385
|
|
|
|
|
1163
|
return $self; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub body_hash { |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# Not defined for ARC-Seal |
40
|
131
|
|
|
131
|
1
|
261
|
return; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub DEFAULT_PREFIX { |
44
|
442
|
|
|
442
|
0
|
1075
|
return 'ARC-Seal:'; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub chain { |
49
|
385
|
|
|
385
|
1
|
541
|
my $self = shift; |
50
|
385
|
50
|
|
|
|
857
|
if (@_) { |
51
|
385
|
|
|
|
|
604
|
my $cv = shift; |
52
|
|
|
|
|
|
|
die "INVALID chain value $cv" |
53
|
385
|
50
|
|
|
|
595
|
unless grep { $cv eq $_ } qw(none fail pass); |
|
1155
|
|
|
|
|
2418
|
|
54
|
385
|
|
|
|
|
866
|
$self->set_tag( 'cv', $cv ); |
55
|
|
|
|
|
|
|
} |
56
|
385
|
|
|
|
|
834
|
return $self->get_tag('cv'); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub canonicalization { |
61
|
382
|
|
|
382
|
1
|
994
|
return ( 'seal', 'seal' ); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |