def test_md_741_001(self, env): # setup an MD with a MDMessageCmd that make the http-01 challenge file invalid # before the ACME server is asked to retrieve it. This will result in # an "invalid" domain authorization. # The certificate sign-up will be attempted again after 4 seconds and # of course fail again. # Verify that the error counter for the staging job increments, so # that our retry logic goes into proper delayed backoff.
domain = self.test_domain
domains = [domain]
conf = MDConf(env)
conf.add("MDCAChallenges http-01")
conf.add(f"MDMessageCmd {self.mcmd} {env.store_dir}")
conf.add_md(domains)
conf.add_vhost(domains)
conf.install() assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
md = env.await_error(domain, errors=2, timeout=10) assert md assert md['renewal']['errors'] > 0 #
env.httpd_error_log.ignore_recent(
lognos = [ "AH10056"# CA considers answer to challenge invalid
],
matches = [
r'.*The key authorization file from the server did not match this challenge.*',
r'.*CA considers answer to challenge invalid.*'
]
)
# mess up the produced staging area before reload def test_md_741_002(self, env):
domain = self.test_domain
domains = [domain]
conf = MDConf(env)
conf.add_md(domains)
conf.add_vhost(domains)
conf.install() assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
env.check_md(domains) assert env.await_completion([domain], restart=False)
staged_md_path = env.store_staged_file(domain, 'md.json') with open(staged_md_path, 'w') as fd:
fd.write('garbage\n') assert env.apache_restart() == 0, f'{env.apachectl_stderr}' assert env.await_completion([domain])
env.check_md_complete(domain)
env.httpd_error_log.ignore_recent(
lognos = [ "AH10069"# failed to load JSON file
],
matches = [
r'.*failed to load JSON file.*',
]
)
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.