# normal renewal with store locks activated def test_md_820_001(self, env):
domain = self.test_domain
self.configure_httpd(env, [domain], add_lines=[ "MDStoreLocks 1s"
]) assert env.apache_restart() == 0, f'{env.apachectl_stderr}' assert env.await_completion([domain])
# renewal, with global lock held during restert
@pytest.mark.skip("does not work in our CI") def test_md_820_002(self, env):
domain = self.test_domain
self.configure_httpd(env, [domain], add_lines=[ "MDStoreLocks 1s"
]) assert env.apache_restart() == 0, f'{env.apachectl_stderr}' assert env.await_completion([domain]) # we have a cert now, add a dns name to force renewal
certa = MDCertUtil(env.store_domain_file(domain, 'pubcert.pem'))
self.configure_httpd(env, [domain, f"x.{domain}"], add_lines=[ "MDStoreLocks 1s"
]) assert env.apache_restart() == 0, f'{env.apachectl_stderr}' # await new cert, but do not restart, keeps the cert in staging assert env.await_completion([domain], restart=False) # obtain global lock and restart
lockfile = os.path.join(env.store_dir, "store.lock") with FileLock(lockfile): assert env.apache_restart() == 0, f'{env.apachectl_stderr}' # lock should have prevented staging from being activated, # meaning we will have the same cert
certb = MDCertUtil(env.store_domain_file(domain, 'pubcert.pem')) assert certa.same_serial_as(certb) # now restart without lock assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
certc = MDCertUtil(env.store_domain_file(domain, 'pubcert.pem')) assertnot certa.same_serial_as(certc)
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.