Commit fe4fb9d7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

implement publicRsaTooSmall settings

parent 12e355cf
......@@ -49,4 +49,8 @@ void DKIMAdvancedWidgetTest::shouldHaveDefaultValues()
QComboBox *mSha1Policy = w.findChild<QComboBox *>(QStringLiteral("rsa1-policy"));
QVERIFY(mSha1Policy);
QVERIFY(mSha1Policy->count() > 0);
QComboBox *mSmallKeyPolicy = w.findChild<QComboBox *>(QStringLiteral("mSmallKeyPolicy"));
QVERIFY(mSmallKeyPolicy);
QVERIFY(mSmallKeyPolicy->count() > 0);
}
......@@ -48,8 +48,13 @@ DKIMAdvancedWidget::DKIMAdvancedWidget(QWidget *parent)
mSha1Policy = new QComboBox(this);
mSha1Policy->setObjectName(QStringLiteral("rsa1-policy"));
mSha1Policy->addItems({i18n("Nothing"), i18n("Warning"), i18n("Error")});
mainLayout->addRow(i18n("Treat RSA-SHA1 sign algorithm as:"), mSha1Policy);
mSmallKeyPolicy = new QComboBox(this);
mSmallKeyPolicy->setObjectName(QStringLiteral("mSmallKeyPolicy"));
mSmallKeyPolicy->addItems({i18n("Nothing"), i18n("Warning"), i18n("Error")});
mainLayout->addRow(i18n("Treat small Key as:"), mSmallKeyPolicy);
QPushButton *configureServer = new QPushButton(i18n("Configure"), this);
configureServer->setObjectName(QStringLiteral("configure_button"));
connect(configureServer, &QPushButton::clicked, this, &DKIMAdvancedWidget::slotConfigureAuthenticationServer);
......@@ -72,6 +77,7 @@ void DKIMAdvancedWidget::loadSettings()
loadWidget(mSha1Policy, MessageViewer::MessageViewerSettings::self()->policyRsaSha1Item());
loadWidget(mCheckDKIMWhenOnlyTesting, MessageViewer::MessageViewerSettings::self()->verifySignatureWhenOnlyTestItem());
loadWidget(mUseAuthenticationResultRelaxedParser, MessageViewer::MessageViewerSettings::self()->useRelaxedParsingAuthenticationResultsItem());
loadWidget(mSmallKeyPolicy, MessageViewer::MessageViewerSettings::self()->publicRsaTooSmallItem());
}
void DKIMAdvancedWidget::saveSettings()
......@@ -79,6 +85,7 @@ void DKIMAdvancedWidget::saveSettings()
saveComboBox(mSha1Policy, MessageViewer::MessageViewerSettings::self()->policyRsaSha1Item());
saveCheckBox(mCheckDKIMWhenOnlyTesting, MessageViewer::MessageViewerSettings::self()->verifySignatureWhenOnlyTestItem());
saveCheckBox(mUseAuthenticationResultRelaxedParser, MessageViewer::MessageViewerSettings::self()->useRelaxedParsingAuthenticationResultsItem());
saveComboBox(mSmallKeyPolicy, MessageViewer::MessageViewerSettings::self()->publicRsaTooSmallItem());
}
void DKIMAdvancedWidget::resetSettings()
......
......@@ -38,6 +38,7 @@ private:
QComboBox *mSha1Policy = nullptr;
QCheckBox *mCheckDKIMWhenOnlyTesting = nullptr;
QCheckBox *mUseAuthenticationResultRelaxedParser = nullptr;
QComboBox *mSmallKeyPolicy = nullptr;
};
#endif // DKIMADVANCEDWIDGET_H
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