Skip to content

Commit d924a2a

Browse files
authored
Remove Python tests for TLS-ALPN-01 (#8457)
We now test it in the Go integration tests, in validation_test.go's TestMPICTLSALPN01(). Certbot's Python acme client has removed support for TLS-ALPN-01.
1 parent 12d5d1c commit d924a2a

2 files changed

Lines changed: 2 additions & 40 deletions

File tree

test/chisel2.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ def get_chall(authz, typ):
9999
def get_any_supported_chall(authz):
100100
"""
101101
Return the first supported challenge from the given authorization.
102-
Supports HTTP01, DNS01, and TLSALPN01 challenges.
102+
Supports HTTP01 and DNS01.
103103
104104
Note: DNS-ACCOUNT-01 challenge type is excluded from the list of supported
105105
challenge types until the Python ACME library adds support for it.
106106
"""
107107
for chall_body in authz.body.challenges:
108-
if isinstance(chall_body.chall, (challenges.HTTP01, challenges.DNS01, challenges.TLSALPN01)):
108+
if isinstance(chall_body.chall, (challenges.HTTP01, challenges.DNS01)):
109109
return chall_body
110110
raise Exception("No supported challenge types found in authorization")
111111

@@ -137,8 +137,6 @@ def auth_and_issue(domains, chall_type="dns-01", email=None, cert_output=None, c
137137
cleanup = do_http_challenges(client, authzs)
138138
elif chall_type == "dns-01":
139139
cleanup = do_dns_challenges(client, authzs)
140-
elif chall_type == "tls-alpn-01":
141-
cleanup = do_tlsalpn_challenges(client, authzs)
142140
else:
143141
raise Exception("invalid challenge type %s" % chall_type)
144142

@@ -199,19 +197,6 @@ def cleanup():
199197
challSrv.remove_http01_response(token)
200198
return cleanup
201199

202-
def do_tlsalpn_challenges(client, authzs):
203-
cleanup_hosts = []
204-
for a in authzs:
205-
c = get_chall(a, challenges.TLSALPN01)
206-
name, value = (a.body.identifier.value, c.key_authorization(client.net.key))
207-
cleanup_hosts.append(name)
208-
challSrv.add_tlsalpn01_response(name, value)
209-
client.answer_challenge(c, c.response(client.net.key))
210-
def cleanup():
211-
for host in cleanup_hosts:
212-
challSrv.remove_tlsalpn01_response(host)
213-
return cleanup
214-
215200
def expect_problem(problem_type, func):
216201
"""Run a function. If it raises an acme_errors.ValidationError or messages.Error that
217202
contains the given problem_type, return. If it raises no error or the wrong

test/v2_integration.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ def check_challenge_dns_err(chalType):
9898
c = chisel2.get_chall(authzr, challenges.HTTP01)
9999
elif chalType == "dns-01":
100100
c = chisel2.get_chall(authzr, challenges.DNS01)
101-
elif chalType == "tls-alpn-01":
102-
c = chisel2.get_chall(authzr, challenges.TLSALPN01)
103101
else:
104102
raise(Exception("Invalid challenge type requested: {0}".format(challType)))
105103

@@ -130,13 +128,6 @@ def test_dns_challenge_dns_err():
130128
"""
131129
check_challenge_dns_err("dns-01")
132130

133-
def test_tls_alpn_challenge_dns_err():
134-
"""
135-
test_tls_alpn_challenge_dns_err tests that a TLS-ALPN-01 challenge for a domain
136-
with broken DNS produces the correct problem response.
137-
"""
138-
check_challenge_dns_err("tls-alpn-01")
139-
140131
def test_http_challenge_broken_redirect():
141132
"""
142133
test_http_challenge_broken_redirect tests that a common webserver
@@ -482,20 +473,6 @@ def test_http_challenge_timeout():
482473
raise(Exception("expected timeout to occur in under {0} seconds. Took {1}".format(expectedDuration, delta.total_seconds())))
483474

484475

485-
def test_tls_alpn_challenge():
486-
# Pick two random domains
487-
domains = [random_domain(),random_domain()]
488-
489-
# Add A records for these domains to ensure the VA's requests are directed
490-
# to the interface that the challtestsrv has bound for TLS-ALPN-01 challenge
491-
# responses
492-
for host in domains:
493-
challSrv.add_a_record(host, ["64.112.117.134"])
494-
chisel2.auth_and_issue(domains, chall_type="tls-alpn-01")
495-
496-
for host in domains:
497-
challSrv.remove_a_record(host)
498-
499476
def test_overlapping_wildcard():
500477
"""
501478
Test issuance for a random domain and a wildcard version of the same domain

0 commit comments

Comments
 (0)