コード例 #1
0
def setup_module(module):
    print("setup_module: %s" % module.__name__)
    TestEnv.init()
    HttpdConf().add_vhost_test1().add_vhost_test2().add_vhost_noh2(
    ).start_vhost( TestEnv.HTTPS_PORT, "test3", docRoot="htdocs/test1", withSSL=True
    ).add_line("      Protocols h2 http/1.1"
    ).add_line("      Header unset Upgrade"
    ).end_vhost(
    ).install()
        
    # the dir needs to exists for the configuration to have effect
    TestEnv.mkpath("%s/htdocs/ssl-client-verify" % TestEnv.WEBROOT)
    assert TestEnv.apache_restart() == 0
コード例 #2
0
def setup_module(module):
    print("setup_module: %s" % module.__name__)
    TestEnv.init()
    HttpdConf(
    ).add_line("      SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384").add_line(
        "      <Directory \"%s/htdocs/ssl-client-verify\">" %
        TestEnv.WEBROOT).add_line("        Require all granted").add_line(
            "        SSLVerifyClient require"
        ).add_line("        SSLVerifyDepth 0").add_line(
            "      </Directory>").start_vhost(
                TestEnv.HTTPS_PORT, "ssl",
                withSSL=True).add_line("      Protocols h2 http/1.1").add_line(
                    "      "
                ).add_line("      <Location /renegotiate/cipher>").add_line(
                    "          SSLCipherSuite ECDHE-RSA-CHACHA20-POLY1305"
                ).add_line("      </Location>").add_line(
                    "      <Location /renegotiate/verify>").add_line(
                        "          SSLVerifyClient require").add_line(
                            "      </Location>").end_vhost().install()
    # the dir needs to exists for the configuration to have effect
    TestEnv.mkpath("%s/htdocs/ssl-client-verify" % TestEnv.WEBROOT)
    TestEnv.mkpath("%s/htdocs/renegotiate/cipher" % TestEnv.WEBROOT)
    assert TestEnv.apache_restart() == 0
コード例 #3
0
def setup_module(module):
    print("setup_module: %s" % module.__name__)
    TestEnv.init()
    HttpdConf().start_vhost(
        TestEnv.HTTPS_PORT, "push", docRoot="htdocs/test1",
        withSSL=True).add_line("""    Protocols h2 http/1.1"

    RewriteEngine on
    RewriteRule ^/006-push(.*)?\.html$ /006.html
    <Location /006-push.html>
        Header add Link "</006/006.css>;rel=preload"
        Header add Link "</006/006.js>;rel=preloadX"
    </Location>
    <Location /006-push2.html>
        Header add Link "</006/006.css>;rel=preloadX, </006/006.js>; rel=preload"
    </Location>
    <Location /006-push3.html>
        Header add Link "</006/006.css>;rel=preloa,</006/006.js>;rel=preload"
    </Location>
    <Location /006-push4.html>
        Header add Link "</006/006.css;rel=preload, </006/006.js>; preload"
    </Location>
    <Location /006-push5.html>
        Header add Link '</006/006.css>;rel="preload push"'
    </Location>
    <Location /006-push6.html>
        Header add Link '</006/006.css>;rel="push preload"'
    </Location>
    <Location /006-push7.html>
        Header add Link '</006/006.css>;rel="abc preload push"'
    </Location>
    <Location /006-push8.html>
        Header add Link '</006/006.css>;rel="preload"; nopush'
    </Location>
    """).end_vhost().install()
    assert TestEnv.apache_restart() == 0
コード例 #4
0
def setup_module(module):
    print("setup_module: %s" % module.__name__)
    TestEnv.init()
    HttpdConf().add_vhost_noh2().add_vhost_test1().add_vhost_cgi().install()
    assert TestEnv.apache_restart() == 0