Exemple #1
0
 def testSetKeyID(self):
     k = KeySet(basedir = "/tmp/teambox/", keys_name = "test_new")
     k.set_keyid(10)
     self.assertTrue(not k.enc_pkey is None)
     self.assertTrue(not k.enc_skey is None)
     self.assertEqual("10", k.enc_pkey.id)
     self.assertEqual("10", k.enc_skey.id)
     k.delete()
Exemple #2
0
 def testSetSigKey(self):
     k = KeySet(basedir = "/tmp/teambox/", keys_name = "test_new")
     (pk, sk) = Key.newPair(Key.SIG_PAIR, "10", "")
     k.set_sig_skey(sk)
     k.set_sig_pkey(pk)
     self.assertTrue(not k.sig_pkey is None)
     self.assertTrue(not k.sig_skey is None)
     k.delete()
Exemple #3
0
 def testReload(self):
     k1 = KeySet(basedir = "/tmp/teambox/", keys_name = "test_new2")
     self.assertTrue(not k1.enc_zero_pkey is None)
     self.assertTrue(not k1.enc_zero_skey is None)
     k2 = KeySet(basedir = "/tmp/teambox/", keys_name = "test_new2")
     self.assertEqual(k1.enc_zero_pkey, k2.enc_zero_pkey)
     self.assertEqual(k1.enc_zero_skey, k2.enc_zero_skey)
     k1.delete()
     k2.delete()
Exemple #4
0
 def testNewKeySet(self):
     k = KeySet(basedir = "/tmp/teambox/", keys_name = "test_new")
     self.assertTrue(not k.enc_zero_pkey is None)
     self.assertTrue(not k.enc_zero_skey is None)
     k.delete()