(self, env)
| 65 | # MD with stapling on/off and mod_ssl stapling off |
| 66 | # expect to only see stapling response when MD stapling is on |
| 67 | def test_md_801_001(self, env): |
| 68 | md = self.mdA |
| 69 | self.configure_httpd(env, md).install() |
| 70 | assert env.apache_restart() == 0, f'{env.apachectl_stderr}' |
| 71 | stat = env.get_ocsp_status(md) |
| 72 | if MDTestEnv.lacks_ocsp(): |
| 73 | assert 'ocsp' not in stat or stat['ocsp'] == "no response sent", f'{stat}' |
| 74 | else: |
| 75 | assert stat['ocsp'] == "no response sent" |
| 76 | stat = env.get_md_status(md) |
| 77 | assert not stat["stapling"] |
| 78 | # |
| 79 | # turn stapling on, wait for it to appear in connections |
| 80 | self.configure_httpd(env, md, """ |
| 81 | MDStapling on |
| 82 | LogLevel md:trace5 |
| 83 | """).install() |
| 84 | assert env.apache_restart() == 0, f'{env.apachectl_stderr}' |
| 85 | if MDTestEnv.lacks_ocsp(): |
| 86 | stat = env.get_md_status(md) |
| 87 | assert 'ocsp' not in stat or stat['ocsp'] == "no response sent", f'{stat}' |
| 88 | else: |
| 89 | stat = env.await_ocsp_status(md) |
| 90 | assert stat['ocsp'] == "successful (0x0)" |
| 91 | assert stat['verify'] == "0 (ok)" |
| 92 | stat = env.get_md_status(md) |
| 93 | if MDTestEnv.lacks_ocsp(): |
| 94 | assert stat["stapling"] |
| 95 | pkey = 'rsa' |
| 96 | assert 'ocsp' not in stat["cert"][pkey], f'{stat}' |
| 97 | else: |
| 98 | assert stat["stapling"] |
| 99 | pkey = 'rsa' |
| 100 | assert stat["cert"][pkey]["ocsp"]["status"] == "good" |
| 101 | assert stat["cert"][pkey]["ocsp"]["valid"] |
| 102 | # |
| 103 | # turn stapling off (explicitly) again, should disappear |
| 104 | self.configure_httpd(env, md, "MDStapling off").install() |
| 105 | assert env.apache_restart() == 0, f'{env.apachectl_stderr}' |
| 106 | stat = env.get_ocsp_status(md) |
| 107 | if MDTestEnv.lacks_ocsp(): |
| 108 | assert 'ocsp' not in stat or stat['ocsp'] == "no response sent", f'{stat}' |
| 109 | else: |
| 110 | assert stat['ocsp'] == "no response sent" |
| 111 | stat = env.get_md_status(md) |
| 112 | assert not stat["stapling"] |
| 113 | |
| 114 | # MD with stapling on/off and mod_ssl stapling on |
| 115 | # expect to see stapling response in all cases |
nothing calls this directly
no test coverage detected