예제 #1
0
 def setUp(self):
     self.valid_fingerprint = self.key_master.alice_key['fingerprint']
     self.valid_secret_fingerprint = self.key_master.alice_key[
         'fingerprint']
     self.valid_secret_keyid = self.key_master.alice_key['keyid']
     self.key_ring = keyring.KeyRing(self.keydir)
     self.key_finder = keyfinder.KeyFinder(self.key_ring)
예제 #2
0
 def test_result_import_method_valid(self):
     pub_key = self.k.export_key(self.fingerprint)
     import tempfile
     with tempfile.TemporaryDirectory() as temp_home_dir:
         k = keyring.KeyRing(temp_home_dir)
         result = k.import_key(pub_key)
         self.assertTrue(result.count > 0)
예제 #3
0
 def test_result_import_method_not_valid(self):
     pub_key = 'xxx666'
     import tempfile
     with tempfile.TemporaryDirectory() as temp_home_dir:
         k = keyring.KeyRing(temp_home_dir)
         result = k.import_key(pub_key)
         self.assertTrue(result.count == 0)
예제 #4
0
 def __init__(self, gpg_pub_key):
     self.target_pubkey = gpg_pub_key
     self.temp_dir = self.create_temp_dir()
     self.temp_dir_name = self.temp_dir.name
     self.key_ring = keyring.KeyRing(self.temp_dir_name)
     self.result = None
     self.valid = None
     self.key_dict = None
     self.validate()
    def setUp(self):
        self.keydir = self.key_master.alice_dir_path
        self.key_ring = keyring.KeyRing(self.keydir)
        self.key_list = self.key_ring.get_raw_key_list()

        self.name = helpers.alice_key_vals_dict['Name']
        self.email = '<' + helpers.alice_key_vals_dict['Email'] + '>'
        self.keyid = self.key_master.alice_key['keyid']

        self.user_key_uid_string = self.key_master.alice_key['uids'][0]
        self.key_uid_string = self.key_list[0]['uids'][0]
        self.x = keylistformatter.KeyListFormatter()
예제 #6
0
 def setUp(self):
     self.key_master = helpers.SetUpKeys()
     self.k = keyring.KeyRing(self.keydir)
예제 #7
0
 def setUp(self):
     self.key_master = helpers.SetUpKeys()
     self.keydir = self.key_master.alice_dir_path
     self.k = keyring.KeyRing(self.keydir)
예제 #8
0
 def setUp(self):
     self.key_master = helpers.SetUpKeys()
     self.keydir = self.key_master.alice_dir_path
     self.key_ring = keyring.KeyRing(self.keydir)
     self.key_finder = keyfinder.KeyFinder(self.key_ring)
예제 #9
0
 def get_gpg_pubkey(cls, fingerprint):
     key_dir = cls.key_master.alice_dir_path
     key_ring = keyring.KeyRing(key_dir)
     result = key_ring.export_key(fingerprint)
     return result
예제 #10
0
 def __init__(self, key_dir):
     self.key_dir = key_dir
     self.key_ring = keyring.KeyRing(self.key_dir)
     self.key_finder = keyfinder.KeyFinder(self.key_ring)
예제 #11
0
 def __init__(self):
     self.temp_dir = self.create_temp_dir()
     self.temp_dir_name = self.temp_dir.name
     self.key_ring = keyring.KeyRing(self.temp_dir_name)