(self, env)
| 106 | ) |
| 107 | |
| 108 | def test_md_730_003(self, env): |
| 109 | # just configuring one file will not work |
| 110 | domain = self.test_domain |
| 111 | domains = [domain, 'www.%s' % domain] |
| 112 | testpath = os.path.join(env.gen_dir, 'test_730_003') |
| 113 | env.mkpath(testpath) |
| 114 | # cert that is only 10 more days valid |
| 115 | creds = env.create_self_signed_cert(CertificateSpec(domains=domains), |
| 116 | valid_from=timedelta(days=-80), |
| 117 | valid_to=timedelta(days=10), |
| 118 | serial=730001) |
| 119 | cert_file = os.path.join(testpath, 'pubcert.pem') |
| 120 | pkey_file = os.path.join(testpath, 'privkey.pem') |
| 121 | creds.save_cert_pem(cert_file) |
| 122 | creds.save_pkey_pem(pkey_file) |
| 123 | conf = MDConf(env) |
| 124 | conf.start_md(domains) |
| 125 | conf.add(f"MDCertificateFile {cert_file}") |
| 126 | conf.end_md() |
| 127 | conf.add_vhost(domain) |
| 128 | conf.install() |
| 129 | assert env.apache_fail() == 0 |
| 130 | |
| 131 | conf = MDConf(env) |
| 132 | conf.start_md(domains) |
| 133 | conf.add(f"MDCertificateKeyFile {pkey_file}") |
| 134 | conf.end_md() |
| 135 | conf.add_vhost(domain) |
| 136 | conf.install() |
| 137 | assert env.apache_fail() == 0 |
| 138 | # |
| 139 | env.httpd_error_log.ignore_recent( |
| 140 | lognos = [ |
| 141 | "AH10170", # Managed Domain needs one MDCertificateKeyFile for each MDCertificateFile |
| 142 | "AH10171" # Managed Domain has MDCertificateKeyFile(s) but no MDCertificateFile |
| 143 | ] |
| 144 | ) |
nothing calls this directly
no test coverage detected