Beispiel #1
0
 def test_tpp_renew_twice(self):
     cn = random_word(10) + ".venafi.example.com"
     cert_id, pkey, cert, _, _ = enroll(self.tpp_conn, self.tpp_zone, cn)
     time.sleep(5)
     renew(self.tpp_conn, cert_id, pkey, cert.serial_number, cn)
     time.sleep(5)
     renew(self.tpp_conn, cert_id, pkey, cert.serial_number, cn)
Beispiel #2
0
 def test_tpp_enroll_with_zone_update_and_custom_origin(self):
     cn = random_word(10) + ".venafi.example.com"
     cert, cert_guid = enroll_with_zone_update(self.tpp_conn,
                                               self.tpp_zone_ecdsa, cn)
     cert_config = self.tpp_conn._get_certificate_details(cert_guid)
     self.assertEqual(cert_config["Origin"], "Python-SDK ECDSA")
     cert = x509.load_pem_x509_certificate(cert.cert.encode(),
                                           default_backend())
     key = cert.public_key()
     self.assertEqual(key.curve.name, "secp521r1")
Beispiel #3
0
 def test_tpp_enroll_with_custom_fields(self):
     cn = random_word(10) + ".venafi.example.com"
     custom_fields = [
         CustomField(name="custom", value="pythonTest"),
         CustomField(name="cfList", value="item2"),
         CustomField(name="cfListMulti", value="tier1"),
         CustomField(name="cfListMulti", value="tier4")
     ]
     cert_id, pkey, cert, _, cert_guid = enroll(conn=self.tpp_conn,
                                                zone=self.tpp_zone,
                                                cn=cn,
                                                custom_fields=custom_fields)
     cert_config = self.tpp_conn._get_certificate_details(cert_guid)
     self.assertEqual(cert_config["Origin"], "Venafi VCert-Python")
Beispiel #4
0
 def test_tpp_renew_by_thumbprint(self):
     cn = random_word(10) + ".venafi.example.com"
     cert_id, pkey, cert, _, _ = enroll(self.tpp_conn, self.tpp_zone, cn)
     renew_by_thumbprint(self.tpp_conn, cert)
Beispiel #5
0
 def test_tpp_enroll_origin(self):
     cn = random_word(10) + ".venafi.example.com"
     _, pkey, cert, _, cert_guid = enroll(self.tpp_conn, self.tpp_zone, cn)
     cert_config = self.tpp_conn._get_certificate_details(cert_guid)
     self.assertEqual(cert_config["Origin"], "Venafi VCert-Python")
Beispiel #6
0
 def test_tpp_enroll_with_encrypted_key(self):
     cn = random_word(10) + ".venafi.example.com"
     enroll(self.tpp_conn, self.tpp_zone, cn,
            TEST_KEY_RSA_2048_ENCRYPTED[0], TEST_KEY_RSA_2048_ENCRYPTED[1],
            'venafi')
Beispiel #7
0
 def test_tpp_enroll_with_custom_key(self):
     cn = random_word(10) + ".venafi.example.com"
     enroll(self.tpp_conn, self.tpp_zone, cn, TEST_KEY_RSA_4096[0],
            TEST_KEY_RSA_4096[1])
Beispiel #8
0
 def test_tpp_enroll_ecdsa(self):
     cn = random_word(10) + ".venafi.example.com"
     enroll(self.tpp_conn, self.tpp_zone_ecdsa, cn, TEST_KEY_ECDSA[0],
            TEST_KEY_ECDSA[1])