msg_auth_status/dkim/signature.rs
1//! DKIM Signatures
2
3use crate::dkim::*;
4
5/// RFC 6376 s. 3.5
6#[derive(Clone, Debug, PartialEq)]
7pub struct DkimSignature<'hdr> {
8 /// Version
9 pub v: DkimVersion<'hdr>,
10 /// Algorithm
11 pub a: DkimAlgorithm<'hdr>,
12 /// Signature data (base64)
13 pub b: &'hdr str,
14 /// Hash of canonicalized body part of the message as limited by the 'l='
15 pub bh: &'hdr str,
16 /// Message canonicalization informs the verifier of the type of canonicalization used to prepare the message for signing. See s.3.4
17 pub c: Option<DkimCanonicalization<'hdr>>,
18 /// The SDID claiming responsibility for an introduction of a message into the mail stream
19 pub d: &'hdr str,
20 /// Signed header fields separated by colon ':' - see 'h='
21 pub h: &'hdr str,
22 /// The Agent or User Identifier (AUID) on behalf of which the SDID is taking responsibility.
23 pub i: Option<&'hdr str>,
24 /// Body length limit - see misuse on RFC 6376 s. 8.2
25 pub l: Option<&'hdr str>,
26 /// Query methods - currently only DnsTxt
27 pub q: Option<&'hdr str>,
28 /// The selector subdividing the namespace for the "d=" (domain) tag
29 pub s: &'hdr str,
30 /// Recommended - Signature Timestamp
31 pub t: Option<DkimTimestamp<'hdr>>,
32 /// Recommended - Signature Expiration
33 pub x: Option<DkimTimestamp<'hdr>>,
34 /// Copied header fields
35 pub z: Option<&'hdr str>,
36 /// Raw unparsed
37 pub raw: Option<&'hdr str>,
38}