aboutsummaryrefslogtreecommitdiffstats
path: root/src/m_email/test/EMailViewLayoutTest.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2026-10-21 21:42:47 +0200
committersaturneric <[email protected]>2026-10-21 21:42:47 +0200
commitd65a5a56d8a703b144af7f05023931e1a61d5992 (patch)
tree190efdf780aff14f31928aa51be80be7bca7dd8b /src/m_email/test/EMailViewLayoutTest.cpp
parentfix(build): prioritize selected OpenSSL headers (diff)
downloadmodules-d65a5a56d8a703b144af7f05023931e1a61d5992.tar.gz
modules-d65a5a56d8a703b144af7f05023931e1a61d5992.zip
fix(email): show an unauthorized signing key as its own verdict
- map host validity 10 (key not authorized) to a new badge state - rank it between "could not be checked" and "bad signature" - word it on the badge, security view and report, not as BAD - carry it through the verification payload by name - translate the new strings in every shipped locale
Diffstat (limited to 'src/m_email/test/EMailViewLayoutTest.cpp')
-rw-r--r--src/m_email/test/EMailViewLayoutTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/m_email/test/EMailViewLayoutTest.cpp b/src/m_email/test/EMailViewLayoutTest.cpp
index beae5ce..8e75dc1 100644
--- a/src/m_email/test/EMailViewLayoutTest.cpp
+++ b/src/m_email/test/EMailViewLayoutTest.cpp
@@ -275,11 +275,16 @@ TEST(EMailViewLayoutTest, TheSecurityStatusSaysOnlyWhatIsKnown) {
QStringLiteral("Signature verified"));
EXPECT_EQ(EMailSecurityStatus(EMailBadgeState::kSIGNED_BAD, false).text,
QStringLiteral("Bad signature"));
+ EXPECT_EQ(
+ EMailSecurityStatus(EMailBadgeState::kSIGNED_UNAUTHORIZED_KEY, false)
+ .text,
+ QStringLiteral("Signing key not authorized"));
EXPECT_EQ(EMailSecurityStatus(EMailBadgeState::kNOT_PROTECTED, false).text,
QStringLiteral("Not signed or encrypted"));
// A verdict against the signature never wears the signature's icon.
for (const auto badge :
{EMailBadgeState::kSIGNED_BAD, EMailBadgeState::kSIGNED_ERROR,
+ EMailBadgeState::kSIGNED_UNAUTHORIZED_KEY,
EMailBadgeState::kSIGNED_MISMATCH, EMailBadgeState::kMALFORMED}) {
EXPECT_EQ(EMailSecurityStatus(badge, false).icon,
QStringLiteral(":/icons/warning.png"));