コード例 #1
0
ファイル: http_01_test.py プロジェクト: luannalita/artrvl
    def setUp(self, *args, **kwargs):
        super(ApacheHttp01Test, self).setUp(*args, **kwargs)

        self.account_key = self.rsa512jwk
        self.achalls = []  # type: List[achallenges.KeyAuthorizationAnnotatedChallenge]
        vh_truth = util.get_vh_truth(
            self.temp_dir, "debian_apache_2_4/multiple_vhosts")
        # Takes the vhosts for encryption-example.demo, certbot.demo, and
        # vhost.in.rootconf
        self.vhosts = [vh_truth[0], vh_truth[3], vh_truth[10]]

        for i in range(NUM_ACHALLS):
            self.achalls.append(
                achallenges.KeyAuthorizationAnnotatedChallenge(
                    challb=acme_util.chall_to_challb(
                        challenges.HTTP01(token=((chr(ord('a') + i).encode() * 16))),
                        "pending"),
                    domain=self.vhosts[i].name, account_key=self.account_key))

        modules = ["rewrite", "authz_core", "authz_host"]
        for mod in modules:
            self.config.parser.modules.add("mod_{0}.c".format(mod))
            self.config.parser.modules.add(mod + "_module")

        from certbot_apache.http_01 import ApacheHttp01
        self.http = ApacheHttp01(self.config)
コード例 #2
0
ファイル: http_01_test.py プロジェクト: pconrad-fb/certbot
    def setUp(self, *args, **kwargs):
        super(ApacheHttp01Test, self).setUp(*args, **kwargs)

        self.account_key = self.rsa512jwk
        self.achalls = []  # type: List[achallenges.KeyAuthorizationAnnotatedChallenge]
        vh_truth = util.get_vh_truth(
            self.temp_dir, "debian_apache_2_4/multiple_vhosts")
        # Takes the vhosts for encryption-example.demo, certbot.demo, and
        # vhost.in.rootconf
        self.vhosts = [vh_truth[0], vh_truth[3], vh_truth[10]]

        for i in range(NUM_ACHALLS):
            self.achalls.append(
                achallenges.KeyAuthorizationAnnotatedChallenge(
                    challb=acme_util.chall_to_challb(
                        challenges.HTTP01(token=((chr(ord('a') + i).encode() * 16))),
                        "pending"),
                    domain=self.vhosts[i].name, account_key=self.account_key))

        modules = ["rewrite", "authz_core", "authz_host"]
        for mod in modules:
            self.config.parser.modules.add("mod_{0}.c".format(mod))
            self.config.parser.modules.add(mod + "_module")

        from certbot_apache.http_01 import ApacheHttp01
        self.http = ApacheHttp01(self.config)
コード例 #3
0
    def setUp(self):  # pylint: disable=arguments-differ
        super(MultipleVhostsTest, self).setUp()

        self.config = util.get_apache_configurator(
            self.config_path, self.vhost_path, self.config_dir, self.work_dir)
        self.config = self.mock_deploy_cert(self.config)
        self.vh_truth = util.get_vh_truth(
            self.temp_dir, "debian_apache_2_4/multiple_vhosts")
コード例 #4
0
ファイル: autohsts_test.py プロジェクト: certbot/certbot
    def setUp(self):  # pylint: disable=arguments-differ
        super(AutoHSTSTest, self).setUp()

        self.config = util.get_apache_configurator(
            self.config_path, self.vhost_path, self.config_dir, self.work_dir)
        self.config.parser.modules.add("headers_module")
        self.config.parser.modules.add("mod_headers.c")
        self.config.parser.modules.add("ssl_module")
        self.config.parser.modules.add("mod_ssl.c")

        self.vh_truth = util.get_vh_truth(
            self.temp_dir, "debian_apache_2_4/multiple_vhosts")
コード例 #5
0
    def setUp(self):  # pylint: disable=arguments-differ
        super(AutoHSTSTest, self).setUp()

        self.config = util.get_apache_configurator(self.config_path,
                                                   self.vhost_path,
                                                   self.config_dir,
                                                   self.work_dir)
        self.config.parser.modules.add("headers_module")
        self.config.parser.modules.add("mod_headers.c")
        self.config.parser.modules.add("ssl_module")
        self.config.parser.modules.add("mod_ssl.c")

        self.vh_truth = util.get_vh_truth(self.temp_dir,
                                          "debian_apache_2_4/multiple_vhosts")
コード例 #6
0
 def setUp(self):
     zope.component.provideUtility(display_util.FileDisplay(sys.stdout))
     self.base_dir = "/example_path"
     self.vhosts = util.get_vh_truth(self.base_dir,
                                     "debian_apache_2_4/multiple_vhosts")
コード例 #7
0
ファイル: display_ops_test.py プロジェクト: EmuxEvans/certbot
 def setUp(self):
     zope.component.provideUtility(display_util.FileDisplay(sys.stdout))
     self.base_dir = "/example_path"
     self.vhosts = util.get_vh_truth(
         self.base_dir, "debian_apache_2_4/multiple_vhosts")
コード例 #8
0
 def setUp(self):
     self.base_dir = "/example_path"
     self.vhosts = util.get_vh_truth(
         self.base_dir, "debian_apache_2_4/multiple_vhosts")
コード例 #9
0
ファイル: display_ops_test.py プロジェクト: jsongo/certbot
 def setUp(self):
     self.base_dir = "/example_path"
     self.vhosts = util.get_vh_truth(
         self.base_dir, "debian_apache_2_4/multiple_vhosts")