73
73
TLSCipherOrderEvaluation ,
74
74
TLSOCSPEvaluation ,
75
75
KeyExchangeRSAPKCSFunctionEvaluation ,
76
+ TLSRenegotiationEvaluation ,
76
77
)
77
78
from checks .tasks .tls .tls_constants import (
78
79
CERT_SIGALG_GOOD ,
@@ -621,6 +622,9 @@ def check_mail_tls(result: ServerScanResult, all_suites: List[CipherSuitesScanAt
621
622
key_exchange_rsa_pkcs_evaluation = test_key_exchange_rsa_pkcs (server_conn_info )
622
623
key_exchange_hash_evaluation = test_key_exchange_hash (server_conn_info )
623
624
625
+ renegotiation_evaluation = TLSRenegotiationEvaluation .from_session_renegotiation_scan_result (
626
+ result .scan_result .session_renegotiation .result
627
+ )
624
628
cert_results = cert_checks (result .server_location .hostname , ChecksMode .MAIL )
625
629
626
630
# HACK for DANE-TA(2) and hostname mismatch!
@@ -642,18 +646,10 @@ def check_mail_tls(result: ServerScanResult, all_suites: List[CipherSuitesScanAt
642
646
cipher_order_score = cipher_order_evaluation .score ,
643
647
cipher_order = cipher_order_evaluation .status ,
644
648
cipher_order_violation = cipher_order_evaluation .violation ,
645
- secure_reneg = result .scan_result .session_renegotiation .result .supports_secure_renegotiation ,
646
- secure_reneg_score = (
647
- scoring .WEB_TLS_SECURE_RENEG_GOOD
648
- if result .scan_result .session_renegotiation .result .supports_secure_renegotiation
649
- else scoring .WEB_TLS_SECURE_RENEG_BAD
650
- ),
651
- client_reneg = result .scan_result .session_renegotiation .result .is_vulnerable_to_client_renegotiation_dos ,
652
- client_reneg_score = (
653
- scoring .WEB_TLS_CLIENT_RENEG_BAD
654
- if result .scan_result .session_renegotiation .result .is_vulnerable_to_client_renegotiation_dos
655
- else scoring .WEB_TLS_CLIENT_RENEG_GOOD
656
- ),
649
+ secure_reneg = renegotiation_evaluation .status_secure_renegotiation ,
650
+ secure_reneg_score = renegotiation_evaluation .score_secure_renegotiation ,
651
+ client_reneg = renegotiation_evaluation .status_client_initiated_renegotiation ,
652
+ client_reneg_score = renegotiation_evaluation .score_client_initiated_renegotiation ,
657
653
compression = result .scan_result .tls_compression .result .supports_compression
658
654
if result .scan_result .tls_compression .result
659
655
else None ,
@@ -750,6 +746,9 @@ def check_web_tls(url, af_ip_pair=None, *args, **kwargs):
750
746
)
751
747
key_exchange_rsa_pkcs_evaluation = test_key_exchange_rsa_pkcs (server_conn_info )
752
748
key_exchange_hash_evaluation = test_key_exchange_hash (server_conn_info )
749
+ renegotiation_evaluation = TLSRenegotiationEvaluation .from_session_renegotiation_scan_result (
750
+ result .scan_result .session_renegotiation .result
751
+ )
753
752
754
753
ocsp_evaluation = TLSOCSPEvaluation .from_certificate_deployments (
755
754
result .scan_result .certificate_info .result .certificate_deployments [0 ]
@@ -768,18 +767,10 @@ def check_web_tls(url, af_ip_pair=None, *args, **kwargs):
768
767
cipher_order_score = cipher_order_evaluation .score ,
769
768
cipher_order = cipher_order_evaluation .status ,
770
769
cipher_order_violation = cipher_order_evaluation .violation ,
771
- secure_reneg = result .scan_result .session_renegotiation .result .supports_secure_renegotiation ,
772
- secure_reneg_score = (
773
- scoring .WEB_TLS_SECURE_RENEG_GOOD
774
- if result .scan_result .session_renegotiation .result .supports_secure_renegotiation
775
- else scoring .WEB_TLS_SECURE_RENEG_BAD
776
- ),
777
- client_reneg = result .scan_result .session_renegotiation .result .is_vulnerable_to_client_renegotiation_dos ,
778
- client_reneg_score = (
779
- scoring .WEB_TLS_CLIENT_RENEG_BAD
780
- if result .scan_result .session_renegotiation .result .is_vulnerable_to_client_renegotiation_dos
781
- else scoring .WEB_TLS_CLIENT_RENEG_GOOD
782
- ),
770
+ secure_reneg = renegotiation_evaluation .status_secure_renegotiation ,
771
+ secure_reneg_score = renegotiation_evaluation .score_secure_renegotiation ,
772
+ client_reneg = renegotiation_evaluation .status_client_initiated_renegotiation ,
773
+ client_reneg_score = renegotiation_evaluation .score_client_initiated_renegotiation ,
783
774
compression = result .scan_result .tls_compression .result .supports_compression ,
784
775
compression_score = (
785
776
scoring .WEB_TLS_COMPRESSION_BAD
@@ -820,7 +811,10 @@ def run_sslyze(
820
811
This threading is handled inside sslyze.
821
812
"""
822
813
log .debug (f"starting sslyze scan for { [scan .server_location for scan in scans ]} " )
823
- scanner = Scanner (per_server_concurrent_connections_limit = connection_limit , concurrent_server_scans_limit = 10 )
814
+ scanner = Scanner (
815
+ per_server_concurrent_connections_limit = connection_limit ,
816
+ concurrent_server_scans_limit = TLSRenegotiationEvaluation .SCAN_RENEGOTIATION_LIMIT ,
817
+ )
824
818
scanner .queue_scans (scans )
825
819
for result in scanner .get_results ():
826
820
log .debug (f"sslyze scan for { result .server_location } result: { result .scan_status } " )
0 commit comments