Skip to content

Commit f7e864d

Browse files
committed
fix(smtp): simplify PQC warning detail message and bump quantumvalidator submodule
1 parent 8bde3ce commit f7e864d

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

mailvalidator/checks/smtp/_pqc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ def _check_pqc(host: str, port: int, checks: list[CheckResult]) -> None:
102102
)
103103
)
104104
else:
105-
details = ["No post-quantum hybrid group negotiated."]
106-
if kex_check:
107-
details.append(kex_check.reason)
105+
details = [kex_check.reason if kex_check else "No post-quantum hybrid group negotiated."]
108106
checks.append(
109107
CheckResult(
110108
name="PQC Key Exchange",

tests/checks/test_pqc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ def test_warning_status_with_kex_reason(self):
150150
assert cr.name == "PQC Key Exchange"
151151
assert cr.status == Status.WARNING
152152
assert cr.value == "x25519"
153-
assert "No post-quantum hybrid group negotiated." in cr.details
154-
assert any("X25519MLKEM768" in d for d in cr.details)
153+
assert cr.details == ["No PQC hybrid group; got x25519. Enable X25519MLKEM768."]
155154

156155
def test_warning_none_group(self):
157156
checks: list = []

vendor/quantumvalidator

0 commit comments

Comments
 (0)