Skip to content

Commit 903be94

Browse files
committed
lint
1 parent 80c6425 commit 903be94

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

checks/tasks/tls/scans.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,12 @@ def cert_checks(hostname, mode, task, af_ip_pair=None, dane_cb_data=None, *args,
268268
if mode == ChecksMode.WEB:
269269
port = 443
270270
scan = ServerScanRequest(
271-
server_location=ServerNetworkLocation(hostname=hostname_no_trailing_dot, ip_address=af_ip_pair[1], port=port),
272-
network_configuration=ServerNetworkConfiguration(tls_server_name_indication=hostname_no_trailing_dot, http_user_agent=settings.USER_AGENT),
271+
server_location=ServerNetworkLocation(
272+
hostname=hostname_no_trailing_dot, ip_address=af_ip_pair[1], port=port
273+
),
274+
network_configuration=ServerNetworkConfiguration(
275+
tls_server_name_indication=hostname_no_trailing_dot, http_user_agent=settings.USER_AGENT
276+
),
273277
scan_commands={ScanCommand.CERTIFICATE_INFO},
274278
scan_commands_extra_arguments=ScanCommandsExtraArguments(
275279
certificate_info=CertificateInfoExtraArgument(custom_ca_file=Path(settings.CA_CERTIFICATES))
@@ -280,7 +284,8 @@ def cert_checks(hostname, mode, task, af_ip_pair=None, dane_cb_data=None, *args,
280284
scan = ServerScanRequest(
281285
server_location=ServerNetworkLocation(hostname=hostname_no_trailing_dot, port=port),
282286
network_configuration=ServerNetworkConfiguration(
283-
tls_server_name_indication=hostname_no_trailing_dot, tls_opportunistic_encryption=ProtocolWithOpportunisticTlsEnum.SMTP,
287+
tls_server_name_indication=hostname_no_trailing_dot,
288+
tls_opportunistic_encryption=ProtocolWithOpportunisticTlsEnum.SMTP,
284289
smtp_ehlo_hostname=settings.SMTP_EHLO_DOMAIN,
285290
),
286291
scan_commands={ScanCommand.CERTIFICATE_INFO},
@@ -465,7 +470,8 @@ def check_mail_tls(server, dane_cb_data, task):
465470
scan = ServerScanRequest(
466471
server_location=ServerNetworkLocation(hostname=server, port=25),
467472
network_configuration=ServerNetworkConfiguration(
468-
tls_server_name_indication=server, tls_opportunistic_encryption=ProtocolWithOpportunisticTlsEnum.SMTP,
473+
tls_server_name_indication=server,
474+
tls_opportunistic_encryption=ProtocolWithOpportunisticTlsEnum.SMTP,
469475
smtp_ehlo_hostname=settings.SMTP_EHLO_DOMAIN,
470476
),
471477
scan_commands=SSLYZE_SCAN_COMMANDS,
@@ -572,8 +578,9 @@ def check_web_tls(url, af_ip_pair=None, *args, **kwargs):
572578
"""
573579
scan = ServerScanRequest(
574580
server_location=ServerNetworkLocation(hostname=url, ip_address=af_ip_pair[1]),
575-
network_configuration=ServerNetworkConfiguration(tls_server_name_indication=url,
576-
http_user_agent=settings.USER_AGENT),
581+
network_configuration=ServerNetworkConfiguration(
582+
tls_server_name_indication=url, http_user_agent=settings.USER_AGENT
583+
),
577584
scan_commands=SSLYZE_SCAN_COMMANDS | {ScanCommand.CERTIFICATE_INFO},
578585
scan_commands_extra_arguments=ScanCommandsExtraArguments(
579586
certificate_info=CertificateInfoExtraArgument(custom_ca_file=Path(settings.CA_CERTIFICATES))

0 commit comments

Comments
 (0)