@@ -974,6 +974,7 @@ def test_cipher_order(
974974 This is tested at all levels that the server supported.
975975 """
976976 cipher_order_violation = []
977+ status = CipherOrderStatus .good
977978 if (
978979 not cipher_evaluation .ciphers_bad
979980 and not cipher_evaluation .ciphers_phase_out
@@ -989,14 +990,19 @@ def test_cipher_order(
989990
990991 order_tuples = [
991992 (
993+ CipherOrderStatus .sufficient_above_good ,
992994 cipher_evaluation .ciphers_bad + cipher_evaluation .ciphers_phase_out + cipher_evaluation .ciphers_sufficient ,
993995 # Make sure we do not mix in TLS 1.3 ciphers, all TLS 1.3 ciphers are good.
994996 cipher_evaluation .ciphers_good_no_tls13 ,
995997 ),
996- (cipher_evaluation .ciphers_bad + cipher_evaluation .ciphers_phase_out , cipher_evaluation .ciphers_sufficient ),
997- (cipher_evaluation .ciphers_bad , cipher_evaluation .ciphers_phase_out ),
998+ (
999+ CipherOrderStatus .bad ,
1000+ cipher_evaluation .ciphers_bad + cipher_evaluation .ciphers_phase_out ,
1001+ cipher_evaluation .ciphers_sufficient ,
1002+ ),
1003+ (CipherOrderStatus .bad , cipher_evaluation .ciphers_bad , cipher_evaluation .ciphers_phase_out ),
9981004 ]
999- for expected_less_preferred , expected_more_preferred_list in order_tuples :
1005+ for fail_status , expected_less_preferred , expected_more_preferred_list in order_tuples :
10001006 if cipher_order_violation :
10011007 break
10021008 # Sort CHACHA as later in the list, in case SSL_OP_PRIORITIZE_CHACHA is enabled #461
@@ -1009,16 +1015,17 @@ def test_cipher_order(
10091015 )
10101016 if preferred_suite != expected_more_preferred :
10111017 cipher_order_violation = [preferred_suite .name , expected_more_preferred .name ]
1018+ status = fail_status
10121019 log .info (
10131020 f"found cipher order violation for { server_connectivity_info .server_location .hostname } :"
1014- f" preferred { preferred_suite .name } instead of { expected_more_preferred .name } "
1021+ f" preferred { preferred_suite .name } instead of { expected_more_preferred .name } , status { fail_status } "
10151022 )
10161023 break
10171024
10181025 return TLSCipherOrderEvaluation (
10191026 violation = cipher_order_violation ,
1020- status = CipherOrderStatus . bad if cipher_order_violation else CipherOrderStatus . good ,
1021- score = scoring .WEB_TLS_CIPHER_ORDER_BAD if cipher_order_violation else scoring .WEB_TLS_CIPHER_ORDER_GOOD ,
1027+ status = status ,
1028+ score = scoring .WEB_TLS_CIPHER_ORDER_BAD if status == CipherOrderStatus . bad else scoring .WEB_TLS_CIPHER_ORDER_GOOD
10221029 )
10231030
10241031
0 commit comments