7#include "dkimcheckpolicy.h"
9using namespace MessageViewer;
11DKIMCheckPolicy::DKIMCheckPolicy()
16 MessageViewer::MessageViewerSettings::self();
17 mRsaSha1Policy = MessageViewer::MessageViewerSettings::policyRsaSha1();
18 mVerifySignatureWhenOnlyTest = MessageViewer::MessageViewerSettings::verifySignatureWhenOnlyTest();
19 mSaveDkimResult = MessageViewer::MessageViewerSettings::saveDkimResult();
20 mSaveKey = MessageViewer::MessageViewerSettings::saveKey();
21 mAutogenerateRule = MessageViewer::MessageViewerSettings::autogenerateRule();
22 mCheckIfEmailShouldBeSigned = MessageViewer::MessageViewerSettings::checkIfEmailShouldBeSigned();
23 mUseDMarc = MessageViewer::MessageViewerSettings::useDMarc();
24 mUseDefaultRules = MessageViewer::MessageViewerSettings::useDefaultRules();
25 mUseAuthenticationResults = MessageViewer::MessageViewerSettings::useAuthenticationResults();
26 mUseRelaxedParsing = MessageViewer::MessageViewerSettings::useRelaxedParsingAuthenticationResults();
27 mUseOnlyAuthenticationResults = MessageViewer::MessageViewerSettings::useOnlyAuthenticationResults();
28 mAutogenerateRuleOnlyIfSenderInSDID = MessageViewer::MessageViewerSettings::autogenerateRuleOnlyIfSenderOnSDID();
29 mPublicRsaTooSmallPolicy = MessageViewer::MessageViewerSettings::publicRsaTooSmall();
32int DKIMCheckPolicy::rsaSha1Policy()
const
34 return mRsaSha1Policy;
37bool DKIMCheckPolicy::verifySignatureWhenOnlyTest()
const
39 return mVerifySignatureWhenOnlyTest;
42void DKIMCheckPolicy::setRsaSha1Policy(
int rsaSha1Policy)
44 mRsaSha1Policy = rsaSha1Policy;
47void DKIMCheckPolicy::setVerifySignatureWhenOnlyTest(
bool verifySignatureWhenOnlyTest)
49 mVerifySignatureWhenOnlyTest = verifySignatureWhenOnlyTest;
52bool DKIMCheckPolicy::saveDkimResult()
const
54 return mSaveDkimResult;
57void DKIMCheckPolicy::setSaveDkimResult(
bool saveDkimResult)
59 mSaveDkimResult = saveDkimResult;
62int DKIMCheckPolicy::saveKey()
const
67void DKIMCheckPolicy::setSaveKey(
int saveKey)
72bool DKIMCheckPolicy::autogenerateRule()
const
74 return mAutogenerateRule;
77void DKIMCheckPolicy::setAutogenerateRule(
bool autogenerateRule)
79 mAutogenerateRule = autogenerateRule;
82bool DKIMCheckPolicy::checkIfEmailShouldBeSigned()
const
84 return mCheckIfEmailShouldBeSigned;
87void DKIMCheckPolicy::setCheckIfEmailShouldBeSigned(
bool checkIfEmailShouldBeSigned)
89 mCheckIfEmailShouldBeSigned = checkIfEmailShouldBeSigned;
92bool DKIMCheckPolicy::useDMarc()
const
97void DKIMCheckPolicy::setUseDMarc(
bool useDMarc)
102bool DKIMCheckPolicy::useDefaultRules()
const
104 return mUseDefaultRules;
107void DKIMCheckPolicy::setUseDefaultRules(
bool useDefaultRules)
109 mUseDefaultRules = useDefaultRules;
112bool DKIMCheckPolicy::useAuthenticationResults()
const
114 return mUseAuthenticationResults;
117void DKIMCheckPolicy::setUseAuthenticationResults(
bool useAuthenticationResults)
119 mUseAuthenticationResults = useAuthenticationResults;
122bool DKIMCheckPolicy::useRelaxedParsing()
const
124 return mUseRelaxedParsing;
127void DKIMCheckPolicy::setUseRelaxedParsing(
bool useRelaxedParsing)
129 mUseRelaxedParsing = useRelaxedParsing;
132bool DKIMCheckPolicy::useOnlyAuthenticationResults()
const
134 return mUseOnlyAuthenticationResults;
137void DKIMCheckPolicy::setUseOnlyAuthenticationResults(
bool useOnlyAuthenticationResults)
139 mUseOnlyAuthenticationResults = useOnlyAuthenticationResults;
142bool DKIMCheckPolicy::autogenerateRuleOnlyIfSenderInSDID()
const
144 return mAutogenerateRuleOnlyIfSenderInSDID;
147void DKIMCheckPolicy::setAutogenerateRuleOnlyIfSenderInSDID(
bool autogenerateRuleOnlyIfSenderInSDID)
149 mAutogenerateRuleOnlyIfSenderInSDID = autogenerateRuleOnlyIfSenderInSDID;
152int DKIMCheckPolicy::publicRsaTooSmallPolicy()
const
154 return mPublicRsaTooSmallPolicy;
157void DKIMCheckPolicy::setPublicRsaTooSmallPolicy(
int publicRsaTooSmallPolicy)
159 mPublicRsaTooSmallPolicy = publicRsaTooSmallPolicy;