7373 TLSCipherOrderEvaluation ,
7474 TLSOCSPEvaluation ,
7575 KeyExchangeRSAPKCSFunctionEvaluation ,
76+ TLSRenegotiationEvaluation ,
7677)
7778from checks .tasks .tls .tls_constants import (
7879 CERT_SIGALG_GOOD ,
@@ -621,6 +622,9 @@ def check_mail_tls(result: ServerScanResult, all_suites: List[CipherSuitesScanAt
621622 key_exchange_rsa_pkcs_evaluation = test_key_exchange_rsa_pkcs (server_conn_info )
622623 key_exchange_hash_evaluation = test_key_exchange_hash (server_conn_info )
623624
625+ renegotiation_evaluation = TLSRenegotiationEvaluation .from_session_renegotiation_scan_result (
626+ result .scan_result .session_renegotiation .result
627+ )
624628 cert_results = cert_checks (result .server_location .hostname , ChecksMode .MAIL )
625629
626630 # HACK for DANE-TA(2) and hostname mismatch!
@@ -642,18 +646,10 @@ def check_mail_tls(result: ServerScanResult, all_suites: List[CipherSuitesScanAt
642646 cipher_order_score = cipher_order_evaluation .score ,
643647 cipher_order = cipher_order_evaluation .status ,
644648 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 ,
657653 compression = result .scan_result .tls_compression .result .supports_compression
658654 if result .scan_result .tls_compression .result
659655 else None ,
@@ -750,6 +746,9 @@ def check_web_tls(url, af_ip_pair=None, *args, **kwargs):
750746 )
751747 key_exchange_rsa_pkcs_evaluation = test_key_exchange_rsa_pkcs (server_conn_info )
752748 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+ )
753752
754753 ocsp_evaluation = TLSOCSPEvaluation .from_certificate_deployments (
755754 result .scan_result .certificate_info .result .certificate_deployments [0 ]
@@ -768,18 +767,10 @@ def check_web_tls(url, af_ip_pair=None, *args, **kwargs):
768767 cipher_order_score = cipher_order_evaluation .score ,
769768 cipher_order = cipher_order_evaluation .status ,
770769 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 ,
783774 compression = result .scan_result .tls_compression .result .supports_compression ,
784775 compression_score = (
785776 scoring .WEB_TLS_COMPRESSION_BAD
@@ -820,7 +811,10 @@ def run_sslyze(
820811 This threading is handled inside sslyze.
821812 """
822813 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+ )
824818 scanner .queue_scans (scans )
825819 for result in scanner .get_results ():
826820 log .debug (f"sslyze scan for { result .server_location } result: { result .scan_status } " )
0 commit comments