Пример #1
0
 def test_bad_key_id(self):
   checker = delegation.get_signature_checker()
   self_id = model.get_service_self_identity().to_bytes()
   with self.assertRaises(signature.CertificateError):
     checker.get_x509_certificate_pem(self_id, 'bad key id')
Пример #2
0
 def test_bad_key_id(self):
     checker = delegation.get_signature_checker()
     self_id = model.get_service_self_identity().to_bytes()
     with self.assertRaises(signature.CertificateError):
         checker.get_x509_certificate_pem(self_id, 'bad key id')
Пример #3
0
 def test_default_works(self):
   checker = delegation.get_signature_checker()
   self_id = model.get_service_self_identity().to_bytes()
   self.assertTrue(checker.is_trusted_signer(self_id))
   # 'key' is name of fake key in the testbed.
   self.assertTrue(checker.get_x509_certificate_pem(self_id, 'key'))
Пример #4
0
 def test_default_works(self):
     checker = delegation.get_signature_checker()
     self_id = model.get_service_self_identity().to_bytes()
     self.assertTrue(checker.is_trusted_signer(self_id))
     # 'key' is name of fake key in the testbed.
     self.assertTrue(checker.get_x509_certificate_pem(self_id, 'key'))