Exemplo n.º 1
0
 def test_generate_ecdsa_key(self):
     req = CertificateRequest(common_name="test.exampe.com",
                              key_type=KeyType("ecdsa", "p384"))
     req._gen_key()
     self.assertEqual(req.public_key.curve.name, "secp384r1")
Exemplo n.º 2
0
 def test_generate_rsa_key(self):
     req = CertificateRequest(common_name="test.example.com",
                              key_type=KeyType("rsa", 2048))
     req._gen_key()
     self.assertEqual(req.public_key.key_size, 2048)