Ejemplo n.º 1
0
 def test_get_client_certificate_from_file(self):
     cert_path = os.path.join(_support.DATA_DIR, "client.pem")
     cert = get_certificate_from_file(cert_path)
     self.assertIsNotNone(cert)
     self.assertIsInstance(cert, ASN1CertificateData)
     self.assertFalse(cert.validated)
     self.assertTrue("*****@*****.**" in cert.alt_names["XmppAddr"])
Ejemplo n.º 2
0
 def test_get_client_certificate_from_file(self):
     cert_path = os.path.join(_support.DATA_DIR, "client.pem")
     cert = get_certificate_from_file(cert_path)
     self.assertIsNotNone(cert)
     self.assertIsInstance(cert, ASN1CertificateData)
     self.assertFalse(cert.validated)
     self.assertTrue("*****@*****.**" in cert.alt_names["XmppAddr"])
Ejemplo n.º 3
0
 def test_get_server_certificate_from_file(self):
     cert_path = os.path.join(_support.DATA_DIR, "server.pem")
     cert = get_certificate_from_file(cert_path)
     self.assertIsNotNone(cert)
     self.assertIsInstance(cert, ASN1CertificateData)
     self.assertFalse(cert.validated)
     self.assertTrue("server.example.org" in cert.common_names)
Ejemplo n.º 4
0
 def test_get_server_certificate_from_file(self):
     cert_path = os.path.join(_support.DATA_DIR, "server.pem")
     cert = get_certificate_from_file(cert_path)
     self.assertIsNotNone(cert)
     self.assertIsInstance(cert, ASN1CertificateData)
     self.assertFalse(cert.validated)
     self.assertTrue("server.example.org" in cert.common_names)