(self, env)
| 115 | # expect to see stapling response in all cases |
| 116 | @pytest.mark.skipif(MDTestEnv.lacks_ocsp(), reason="no OCSP responder") |
| 117 | def test_md_801_002(self, env): |
| 118 | md = self.mdA |
| 119 | self.configure_httpd(env, md, ssl_stapling=True).install() |
| 120 | assert env.apache_restart() == 0, f'{env.apachectl_stderr}' |
| 121 | stat = env.get_ocsp_status(md) |
| 122 | assert stat['ocsp'] == "successful (0x0)" if \ |
| 123 | env.ssl_module == "mod_ssl" else "no response sent" |
| 124 | stat = env.get_md_status(md) |
| 125 | assert not stat["stapling"] |
| 126 | # |
| 127 | # turn stapling on, wait for it to appear in connections |
| 128 | self.configure_httpd(env, md, "MDStapling on", ssl_stapling=True).install() |
| 129 | assert env.apache_restart() == 0, f'{env.apachectl_stderr}' |
| 130 | stat = env.await_ocsp_status(md) |
| 131 | assert stat['ocsp'] == "successful (0x0)" |
| 132 | assert stat['verify'] == "0 (ok)" |
| 133 | stat = env.get_md_status(md) |
| 134 | assert stat["stapling"] |
| 135 | pkey = 'rsa' |
| 136 | assert stat["cert"][pkey]["ocsp"]["status"] == "good" |
| 137 | assert stat["cert"][pkey]["ocsp"]["valid"] |
| 138 | # |
| 139 | # turn stapling off (explicitly) again, should disappear |
| 140 | self.configure_httpd(env, md, "MDStapling off", ssl_stapling=True).install() |
| 141 | assert env.apache_restart() == 0, f'{env.apachectl_stderr}' |
| 142 | stat = env.get_ocsp_status(md) |
| 143 | assert stat['ocsp'] == "successful (0x0)" if \ |
| 144 | env.ssl_module == "mod_ssl" else "no response sent" |
| 145 | stat = env.get_md_status(md) |
| 146 | assert not stat["stapling"] |
| 147 | |
| 148 | # 2 MDs, one with md stapling on, one with default (off) |
| 149 | def test_md_801_003(self, env): |
nothing calls this directly
no test coverage detected