+#!/usr/bin/python
+import sys
+sys.path.append('..')
+
import unittest
-import xmlrpclib
-from cert import *
+import base64
+from sfa.trust.certificate import Keypair
-class TestCert(unittest.TestCase):
+class TestKeypair(unittest.TestCase):
def setUp(self):
pass
pk = k.get_openssl_pkey()
self.assert_(pk != None)
+ def test_sign_verify(self):
+ k = Keypair()
+ k.create()
+
+ data = "this is a test"
+ sig = k.sign_string(data)
+
+ print k.verify_string(data, sig)
+
if __name__ == "__main__":
unittest.main()