Skip to content

Commit 3b59db8

Browse files
committed
Cleanup
1 parent 53ac6b0 commit 3b59db8

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

checks/tasks/tls/evaluation.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def from_ciphers_accepted(cls, ciphers_accepted: List[CipherSuiteAcceptedByServe
111111
phase_out = set()
112112
bad = set()
113113

114-
# Evaluate according to NCSC table 4 and table 10
114+
# Evaluate according to NCSC 3.3.2.1 table 3 and 3.3.3.1 table 7
115115
for suite in _unique_unhashable(ciphers_accepted):
116116
key = suite.ephemeral_key
117117
if not key:
@@ -124,7 +124,6 @@ def from_ciphers_accepted(cls, ciphers_accepted: List[CipherSuiteAcceptedByServe
124124
bad.add(f"ECDH-{key.curve_name}")
125125

126126
if isinstance(key, DhEphemeralKeyInfo):
127-
# NCSC 3.3.3.1
128127
if key.generator == FFDHE_GENERATOR:
129128
if key.prime in FFDHE_PHASE_OUT_PRIMES:
130129
phase_out.add(f"DH-{key.size}")
@@ -340,7 +339,6 @@ class TLSCipherOrderEvaluation:
340339
If a violation is found, the violation attribute is a two
341340
item list with first the cipher preferred by the server,
342341
second the cipher we expected to be preferred above that.
343-
NCSC B2-5
344342
"""
345343

346344
violation: List[str]

checks/tasks/tls/scans.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def cert_checks(hostname: str, mode: ChecksMode, af_ip_pair=None, *args, **kwarg
387387
trusted_score = trusted_score_good if cert_deployment.verified_certificate_chain else trusted_score_bad
388388
pubkey_score, pubkey_bad, pubkey_phase_out = check_pubkey(cert_deployment.received_certificate_chain, mode)
389389

390-
# NCSC guideline B3-2
390+
# NCSC 3.3.2 / 3.3.5
391391
sigalg_bad = {}
392392
sigalg_score = scoring.WEB_TLS_SIGNATURE_GOOD
393393
for cert in cert_deployment.received_certificate_chain:
@@ -972,7 +972,6 @@ def test_cipher_order(
972972
by each good, and then expects the server to choose the good cipher.
973973
That assures us that the server prefers each good cipher over any lower cipher.
974974
This is tested at all levels that the server supported.
975-
NCSC B2-5.
976975
"""
977976
cipher_order_violation = []
978977
if (

checks/tasks/tls/tls_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,4 +270,5 @@
270270
"D68C8BB7 C5C6424C FFFFFFFF FFFFFFFF"
271271
)
272272
FFDHE_GENERATOR = bytearray(b"\x02") # Matched to the type in nassl's DhEphemeralKeyInfo
273+
# NCSC 3.3.3.1
273274
FFDHE_PHASE_OUT_PRIMES = [FFDHE8192_PRIME, FFDHE6144_PRIME, FFDHE4096_PRIME, FFDHE3072_PRIME]

0 commit comments

Comments
 (0)