X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2FtestKeypair.py;h=6562316fe0c6a39e7cd55e30d7af27544179e115;hb=ae0f0630009501938c396cc54b6d94260abf34a6;hp=7ce48e29bc91d491a01a765c59e237f19ac34d6a;hpb=9751af132f2104b0bcf45cb7dafbd4957488654b;p=sfa.git diff --git a/tests/testKeypair.py b/tests/testKeypair.py index 7ce48e29..6562316f 100644 --- a/tests/testKeypair.py +++ b/tests/testKeypair.py @@ -1,5 +1,6 @@ import unittest import xmlrpclib +import base64 from cert import * class TestKeypair(unittest.TestCase): @@ -35,5 +36,14 @@ class TestKeypair(unittest.TestCase): 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()