(self, env)
| 147 | |
| 148 | # 2 MDs, one with md stapling on, one with default (off) |
| 149 | def test_md_801_003(self, env): |
| 150 | md_a = self.mdA |
| 151 | md_b = self.mdB |
| 152 | conf = self.configure_httpd(env) |
| 153 | conf.add(""" |
| 154 | <MDomain %s> |
| 155 | MDStapling on |
| 156 | </MDomain> |
| 157 | <MDomain %s> |
| 158 | </MDomain> |
| 159 | """ % (md_a, md_b)) |
| 160 | conf.add_vhost(md_a) |
| 161 | conf.add_vhost(md_b) |
| 162 | conf.install() |
| 163 | assert env.apache_restart() == 0, f'{env.apachectl_stderr}' |
| 164 | # mdA has stapling |
| 165 | if MDTestEnv.lacks_ocsp(): |
| 166 | stat = env.get_ocsp_status(md_a) |
| 167 | assert 'ocsp' not in stat or stat['ocsp'] == "no response sent", f'{stat}' |
| 168 | else: |
| 169 | stat = env.await_ocsp_status(md_a) |
| 170 | assert stat['ocsp'] == "successful (0x0)" |
| 171 | assert stat['verify'] == "0 (ok)" |
| 172 | stat = env.get_md_status(md_a) |
| 173 | assert stat["stapling"] |
| 174 | if not MDTestEnv.lacks_ocsp(): |
| 175 | pkey = 'rsa' |
| 176 | assert stat["cert"][pkey]["ocsp"]["status"] == "good" |
| 177 | assert stat["cert"][pkey]["ocsp"]["valid"] |
| 178 | # mdB has no stapling |
| 179 | if not MDTestEnv.lacks_ocsp(): |
| 180 | stat = env.get_ocsp_status(md_b) |
| 181 | assert stat['ocsp'] == "no response sent" |
| 182 | stat = env.get_md_status(md_b) |
| 183 | assert not stat["stapling"] |
| 184 | |
| 185 | # 2 MDs, md stapling on+off, ssl stapling on |
| 186 | @pytest.mark.skipif(MDTestEnv.lacks_ocsp(), reason="no OCSP responder") |
nothing calls this directly
no test coverage detected