def test_300_021(self): HttpdConf(text=""" MDomain secret.com <VirtualHost *:12344> ServerName not.secret.com ServerAlias secret.com SSLEngine on </VirtualHost> """).install() assert TestEnv.apache_fail() == 0, "Server did start for {}".format(line) assert (1, 0) == TestEnv.httpd_error_log_count() assert TestEnv.httpd_error_log_scan( re.compile(".*Virtual Host not.secret.com:0 matches Managed Domain 'secret.com', but the name/alias not.secret.com itself is not managed. A requested MD certificate will not match ServerName.*") )
def test_500_120(self): # test case: NP dereference reported by Daniel Caminada <*****@*****.**> domain = self.test_domain name = "www." + domain conf = HttpdConf() conf.add_admin("admin@" + domain) conf.add_drive_mode("manual") conf.add_md([name]) conf.add_vhost(name) conf.install() assert TestEnv.apache_restart() == 0 r = TestEnv.run([ "openssl", "s_client", "-connect", "%s:%s" % (TestEnv.HTTPD_HOST, TestEnv.HTTPS_PORT), "-servername", "example.com", "-crlf" ], "GET https:// HTTP/1.1\nHost: example.com\n\n") assert TestEnv.apache_restart() == 0 # assert that no crash is reported in the log assert not TestEnv.httpd_error_log_scan( re.compile("^.* child pid \S+ exit .*$"))