1Mail::DKIM::DkSignatureU(s3e)r Contributed Perl DocumentaMtaiioln::DKIM::DkSignature(3)
2
3
4

NAME

6       Mail::DKIM::DkSignature - represents a DomainKeys-Signature header
7

CONSTRUCTORS

9   parse() - create a new signature from a DomainKey-Signature header
10         my $sig = parse Mail::DKIM::DkSignature(
11                         "DomainKey-Signature: a=rsa-sha1; b=yluiJ7+0=; c=nofws"
12                   );
13
14       Constructs a signature by parsing the provided DomainKey-Signature
15       header content. You do not have to include the header name (i.e.
16       "DomainKey-Signature:") but it is recommended, so the header name can
17       be preserved and returned the same way in as_string().
18
19       Note: The input to this constructor is in the same format as the output
20       of the as_string method.
21

METHODS

23   as_string() - the signature header as a string
24         print $signature->as_string . "\n";
25
26       outputs
27
28         DomainKey-Signature: a=rsa-sha1; b=yluiJ7+0=; c=nofws
29
30       As shown in the example, the as_string method can be used to generate
31       the DomainKey-Signature that gets prepended to a signed message.
32
33   algorithm() - get or set the algorithm (a=) field
34       The algorithm used to generate the signature.  Defaults to "rsa-sha1",
35       an RSA-signed SHA-1 digest.
36
37   canonicalization() - get or set the canonicalization (c=) field
38         $signature->canonicalization("nofws");
39         $signature->canonicalization("simple");
40
41         $method = $signature->canonicalization;
42
43       Message canonicalization (default is "simple"). This informs the
44       verifier of the type of canonicalization used to prepare the message
45       for signing.
46
47   domain() - get or set the domain (d=) field
48         my $d = $signature->domain;          # gets the domain value
49         $signature->domain("example.org");   # sets the domain value
50
51       The domain of the signing entity, as specified in the signature.  This
52       is the domain that will be queried for the public key.
53
54   headerlist() - get or set the signed header fields (h=) field
55         $signature->headerlist("a:b:c");
56
57         my $headerlist = $signature->headerlist;
58
59         my @headers = $signature->headerlist;
60
61       Signed header fields. A colon-separated list of header field names that
62       identify the header fields presented to the signing algorithm.
63
64       In scalar context, the list of header field names will be returned as a
65       single string, with the names joined together with colons.  In list
66       context, the header field names will be returned as a list.
67
68   identity() - get the signing identity
69         my $i = $signature->identity;
70
71       In DomainKey signatures, the signing identity is the first address
72       found in the Sender header or the From header. This field is populated
73       by the Verifier when processing a DomainKey signature.
74
75   identity_source() - determine which header had the identity
76         my $source = $signature->identity_source;
77
78       If the message is being verified, this method will tell you which of
79       the message headers was used to determine the signature identity.
80       Possible values are "header.sender" and "header.from".
81
82   protocol() - get or set the query methods (q=) field
83       A colon-separated list of query methods used to retrieve the public key
84       (default is "dns").
85
86   selector() - get or set the selector (s=) field
87       The selector subdivides the namespace for the "d=" (domain) tag.
88
89   signature() - get or set the signature data (b=) field
90       The signature data. Whitespace is automatically stripped from the
91       returned value.
92

SEE ALSO

94       Mail::DKIM::Signature for DKIM-Signature headers
95

AUTHOR

97       Jason Long, <jlong@messiah.edu>
98
100       Copyright (C) 2006-2007 by Messiah College
101
102       This library is free software; you can redistribute it and/or modify it
103       under the same terms as Perl itself, either Perl version 5.8.6 or, at
104       your option, any later version of Perl 5 you may have available.
105
106
107
108perl v5.10.1                      2009-07-30        Mail::DKIM::DkSignature(3)
Impressum