Beispiel #1
0
 def test_ssl_expiry_datetime_valid(self):
     result = ssl_expiry_datetime("badssl.com")
     self.assertEqual(result, self.bad_ssl_valid_cert_date)
Beispiel #2
0
 def test_ssl_expiry_datetime_mozilla_intermediate(self):
     ssl_expiry_datetime("mozilla-intermediate.badssl.com")
Beispiel #3
0
 def test_ssl_expiry_datetime_mozilla_modern(self):
     ssl_expiry_datetime("mozilla-modern.badssl.com")
Beispiel #4
0
 def test_ssl_expiry_datetime_mozilla_old(self):
     ssl_expiry_datetime("mozilla-old.badssl.com")
Beispiel #5
0
 def test_ssl_expiry_datetime_revoked(self):
     warning("Should complain about certificate being revoked")
     ssl_expiry_datetime("revoked.badssl.com")
Beispiel #6
0
 def test_ssl_expiry_datetime_untrusted_root(self):
     with self.assertRaises(ssl.SSLError):
         warning("Should not throw ssl.SSLError")
         ssl_expiry_datetime("untrusted-root.badssl.com")
Beispiel #7
0
 def test_ssl_expiry_datetime_self_signed(self):
     with self.assertRaises(ssl.SSLError):
         warning("Should not throw ssl.SSLError")
         ssl_expiry_datetime("self-signed.badssl.com")
Beispiel #8
0
 def test_ssl_expiry_datetime_wrong_host(self):
     with self.assertRaises(ssl.CertificateError):
         warning("Should not throw ssl.CertificateError")
         ssl_expiry_datetime("wrong.host.badssl.com")