Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Mar 12, 2024
1 parent e59e686 commit e845593
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions checks/tasks/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from enum import Enum
from pathlib import Path
from timeit import default_timer as timer
from typing import List, Tuple, Set, Optional
from typing import List, Optional
from urllib.parse import urlparse

import eventlet
Expand All @@ -26,7 +26,7 @@
from django.conf import settings
from django.core.cache import cache
from django.db import transaction
from nassl.ephemeral_key_info import DhEphemeralKeyInfo, EcDhEphemeralKeyInfo, OpenSslEvpPkeyEnum, EphemeralKeyInfo
from nassl.ephemeral_key_info import DhEphemeralKeyInfo, EcDhEphemeralKeyInfo, OpenSslEvpPkeyEnum
from nassl.ssl_client import ClientCertificateRequested
from sslyze import (
Scanner,
Expand Down Expand Up @@ -90,7 +90,10 @@
CERT_CURVE_MIN_KEY_SIZE,
CERT_EC_CURVES_GOOD,
CERT_CURVES_GOOD,
CERT_EC_CURVES_PHASE_OUT, PROTOCOLS_GOOD, PROTOCOLS_SUFFICIENT, PROTOCOLS_PHASE_OUT,
CERT_EC_CURVES_PHASE_OUT,
PROTOCOLS_GOOD,
PROTOCOLS_SUFFICIENT,
PROTOCOLS_PHASE_OUT,
)
from checks.tasks.shared import (
aggregate_subreports,
Expand Down Expand Up @@ -1669,6 +1672,7 @@ class TLSCipherOrderEvaluation:
status: CipherOrderStatus
score: scoring.Score


def test_cipher_order(
server_connectivity_info: ServerConnectivityInfo,
tls_versions: List[TlsVersionEnum],
Expand All @@ -1686,7 +1690,7 @@ def test_cipher_order(
score=scoring.WEB_TLS_CIPHER_ORDER_GOOD,
)

tls_version = sorted([t for t in tls_versions if t != TlsVersionEnum.TLS_1_3], key=lambda t: t.value, reverse=True)[0]
tls_version = sorted([t for t in tls_versions if t != TlsVersionEnum.TLS_1_3], key=lambda t: t.value)[-1]

order_tuples = [
(
Expand Down

0 comments on commit e845593

Please sign in to comment.