Commit 6a62e453 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use too small rsa key settings

parent b8a81b73
......@@ -41,6 +41,7 @@ void DKIMCheckPolicyTest::shouldHaveDefaultValues()
QCOMPARE(pol.rsaSha1Policy(), 1);
QVERIFY(!pol.useRelaxedParsing());
QVERIFY(!pol.useOnlyAuthenticationResults());
QCOMPARE(pol.publicRsaTooSmallPolicy(), 1);
}
void DKIMCheckPolicyTest::shouldAssignValues()
......
......@@ -35,6 +35,7 @@ DKIMCheckPolicy::DKIMCheckPolicy()
mUseRelaxedParsing = MessageViewer::MessageViewerSettings::useRelaxedParsingAuthenticationResults();
mUseOnlyAuthenticationResults = MessageViewer::MessageViewerSettings::useOnlyAuthenticationResults();
mAutogenerateRuleOnlyIfSenderInSDID = MessageViewer::MessageViewerSettings::autogenerateRuleOnlyIfSenderOnSDID();
mPublicRsaTooSmallPolicy = MessageViewer::MessageViewerSettings::publicRsaTooSmall();
}
int DKIMCheckPolicy::rsaSha1Policy() const
......@@ -156,3 +157,13 @@ void DKIMCheckPolicy::setAutogenerateRuleOnlyIfSenderInSDID(bool autogenerateRul
{
mAutogenerateRuleOnlyIfSenderInSDID = autogenerateRuleOnlyIfSenderInSDID;
}
int DKIMCheckPolicy::publicRsaTooSmallPolicy() const
{
return mPublicRsaTooSmallPolicy;
}
void DKIMCheckPolicy::setPublicRsaTooSmallPolicy(int publicRsaTooSmallPolicy)
{
mPublicRsaTooSmallPolicy = publicRsaTooSmallPolicy;
}
......@@ -69,9 +69,13 @@ public:
Q_REQUIRED_RESULT bool autogenerateRuleOnlyIfSenderInSDID() const;
void setAutogenerateRuleOnlyIfSenderInSDID(bool autogenerateRuleOnlyIfSenderInSDID);
Q_REQUIRED_RESULT int publicRsaTooSmallPolicy() const;
void setPublicRsaTooSmallPolicy(int publicRsaTooSmallPolicy);
private:
int mRsaSha1Policy = -1;
int mSaveKey = -1;
int mPublicRsaTooSmallPolicy = -1;
bool mVerifySignatureWhenOnlyTest = false;
bool mSaveDkimResult = false;
bool mAutogenerateRule = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment