MCPcopy Create free account
hub / github.com/apache/httpd / test_md_801_004

Method test_md_801_004

test/modules/md/test_801_stapling.py:187–216  ·  view source on GitHub ↗
(self, env)

Source from the content-addressed store, hash-verified

185 # 2 MDs, md stapling on+off, ssl stapling on
186 @pytest.mark.skipif(MDTestEnv.lacks_ocsp(), reason="no OCSP responder")
187 def test_md_801_004(self, env):
188 md_a = self.mdA
189 md_b = self.mdB
190 conf = self.configure_httpd(env, ssl_stapling=True)
191 conf.add("""
192 <MDomain %s>
193 MDStapling on
194 </MDomain>
195 <MDomain %s>
196 </MDomain>
197 """ % (md_a, md_b))
198 conf.add_vhost(md_a)
199 conf.add_vhost(md_b)
200 conf.install()
201 assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
202 # mdA has stapling
203 stat = env.await_ocsp_status(md_a)
204 assert stat['ocsp'] == "successful (0x0)"
205 assert stat['verify'] == "0 (ok)"
206 stat = env.get_md_status(md_a)
207 assert stat["stapling"]
208 pkey = 'rsa'
209 assert stat["cert"][pkey]["ocsp"]["status"] == "good"
210 assert stat["cert"][pkey]["ocsp"]["valid"]
211 # mdB has no md stapling, but mod_ssl kicks in
212 stat = env.get_ocsp_status(md_b)
213 assert stat['ocsp'] == "successful (0x0)" if \
214 env.ssl_module == "mod_ssl" else "no response sent"
215 stat = env.get_md_status(md_b)
216 assert not stat["stapling"]
217
218 # MD, check that restart leaves response unchanged, reconfigure keep interval,
219 # should remove the file on restart and get a new one

Callers

nothing calls this directly

Calls 8

configure_httpdMethod · 0.95
addMethod · 0.80
add_vhostMethod · 0.80
installMethod · 0.80
apache_restartMethod · 0.80
await_ocsp_statusMethod · 0.80
get_md_statusMethod · 0.80
get_ocsp_statusMethod · 0.80

Tested by

no test coverage detected