Skip to content

Commit

Permalink
Try to fix IPv6 test
Browse files Browse the repository at this point in the history
  • Loading branch information
nabla-c0d3 committed Jan 3, 2025
1 parent 6e1e213 commit 9dfac7b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,14 @@ def test_multiple_certificates(self):
# And multiple certificates were detected
assert len(plugin_result.certificate_deployments) > 1

@can_only_run_on_linux_64
def test_ipv6_server_string(self):
# Given a server to scan for which SSLyze only received an IPv6 address
# Test for https://github.com/nabla-c0d3/sslyze/issues/675
server_location = ServerNetworkLocation("2a00:1450:4007:80d::200e", 443, ip_address="2a00:1450:4007:80d::200e")
server_info = check_connectivity_to_server_and_return_info(server_location)
# Given a server to scan
with ModernOpenSslServer(client_auth_config=ClientAuthConfigEnum.REQUIRED) as server:
# For which SSLyze only received an IPv6 address, no hostname
server_location = ServerNetworkLocation(hostname="::1", port=server.port, ip_address="::1")
server_info = check_connectivity_to_server_and_return_info(server_location)

# When running the scan, it succeeds
plugin_result = CertificateInfoImplementation.scan_server(server_info)
Expand Down

0 comments on commit 9dfac7b

Please sign in to comment.