예제 #1
0
    def _check_domain_already_exists_on_sni_certs(self, domain_name):
        """Check all configured sni certs for domain."""

        found = False
        found_cert = None
        for sni_cert_name in self.sni_cert_cnames:
            sans = utils.get_sans_by_host_alternate(sni_cert_name)
            if domain_name in sans:
                found = True
                found_cert = sni_cert_name
                break

        return found, found_cert
예제 #2
0
    def _check_domain_already_exists_on_sni_certs(self, domain_name):
        """Check all configured sni certs for domain."""

        found = False
        found_cert = None
        for sni_cert_name in self.sni_cert_cnames:
            sans = utils.get_sans_by_host_alternate(sni_cert_name)
            if domain_name in sans:
                found = True
                found_cert = sni_cert_name
                break

        return found, found_cert
예제 #3
0
    def _check_domain_already_exists_on_san_certs(self, domain_name):
        """Check all configured san certs for domain."""

        found = False
        found_cert = None
        for san_cert_name in self.san_cert_cnames:
            sans = utils.get_sans_by_host_alternate('.'.join(
                [san_cert_name, self.driver.akamai_https_access_url_suffix]))
            if domain_name in sans:
                found = True
                found_cert = san_cert_name
                break

        return found, found_cert
예제 #4
0
 def test_get_sans_by_host_alternate(self):
     self.assertEqual(['secured1.sni1.altcdn.com'],
                      utils.get_sans_by_host_alternate('remote_host'))
예제 #5
0
 def test_get_ssl_positive(self):
     self.assertEqual(
         1, utils.get_ssl_number_of_hosts_alternate('remote_host'))
     self.assertEqual(['secured1.sni1.altcdn.com'],
                      utils.get_sans_by_host_alternate('remote_host'))
예제 #6
0
 def test_get_sans_by_host_alternate(self):
     self.assertEqual(['*.r_host', 'r_host'],
                      utils.get_sans_by_host_alternate('remote_host'))
예제 #7
0
 def test_get_sans_by_host_alternate(self):
     self.assertEqual(
         ['*.r_host', 'r_host'],
         utils.get_sans_by_host_alternate('remote_host')
     )