示例#1
0
 def test_get_public_key_dsa(self, mock_get_cert):
     fake_cert = FakeCryptoCertificate(TEST_DSA_PRIVATE_KEY.public_key())
     mock_get_cert.return_value = fake_cert
     sig_key_type = signature_utils.SignatureKeyType.lookup('DSA')
     result_pub_key = signature_utils.get_public_key(None, None,
                                                     sig_key_type)
     self.assertEqual(fake_cert.public_key(), result_pub_key)
示例#2
0
 def test_get_public_key_rsa(self, mock_get_cert):
     fake_cert = FakeCryptoCertificate()
     mock_get_cert.return_value = fake_cert
     sig_key_type = signature_utils.SignatureKeyType.lookup('RSA-PSS')
     result_pub_key = signature_utils.get_public_key(None, None,
                                                     sig_key_type)
     self.assertEqual(fake_cert.public_key(), result_pub_key)
示例#3
0
 def test_get_public_key_dsa(self, mock_get_cert):
     fake_cert = FakeCryptoCertificate(TEST_DSA_PRIVATE_KEY.public_key())
     mock_get_cert.return_value = fake_cert
     sig_key_type = signature_utils.SignatureKeyType.lookup('DSA')
     result_pub_key = signature_utils.get_public_key(
         None, None, sig_key_type)
     self.assertEqual(fake_cert.public_key(), result_pub_key)
示例#4
0
 def test_get_public_key_rsa(self, mock_get_cert):
     fake_cert = FakeCryptoCertificate()
     mock_get_cert.return_value = fake_cert
     sig_key_type = signature_utils.SignatureKeyType.lookup('RSA-PSS')
     result_pub_key = signature_utils.get_public_key(
         None, None, sig_key_type)
     self.assertEqual(fake_cert.public_key(), result_pub_key)
 def test_get_public_key(self, mock_get_cert):
     fake_cert = FakeCryptoCertificate()
     mock_get_cert.return_value = fake_cert
     result_pub_key = signature_utils.get_public_key(None, None, 'RSA-PSS')
     self.assertEqual(fake_cert.public_key(), result_pub_key)
示例#6
0
 def test_get_public_key(self, mock_get_cert):
     fake_cert = FakeCryptoCertificate()
     mock_get_cert.return_value = fake_cert
     result_pub_key = signature_utils.get_public_key(None, None, 'RSA-PSS')
     self.assertEqual(fake_cert.public_key(), result_pub_key)