From: Victor Wagner Date: Wed, 22 Jun 2016 11:07:39 +0000 (+0300) Subject: Merge branch 'master' of https://github.com/vbwagner/ctypescrypto X-Git-Url: https://www.wagner.pp.ru/gitweb/?a=commitdiff_plain;h=6f4f45464e73a5dbfcba8403491be39644f33c5e;hp=ba31abd3ab6d49e6ed3140fcda022ef9c16e27c0;p=oss%2Fctypescrypto.git Merge branch 'master' of https://github.com/vbwagner/ctypescrypto --- diff --git a/ctypescrypto/engine.py b/ctypescrypto/engine.py index f5bdb75..79f6218 100644 --- a/ctypescrypto/engine.py +++ b/ctypescrypto/engine.py @@ -69,3 +69,7 @@ libcrypto.ENGINE_set_default.argtypes = (c_void_p, c_int) libcrypto.ENGINE_ctrl_cmd_string.argtypes = (c_void_p, c_char_p, c_char_p, c_int) libcrypto.ENGINE_finish.argtypes = (c_char_p, ) +libcrypto.ENGINE_init.argtypes = (c_void_p, ) +libcrypto.UI_OpenSSL.restype = c_void_p +libcrypto.ENGINE_load_private_key.argtypes = (c_void_p, c_char_p, c_void_p, c_void_p) +libcrypto.ENGINE_load_private_key.restype = c_void_p diff --git a/tests/testec.py b/tests/testec.py index c5054a5..ccf289c 100644 --- a/tests/testec.py +++ b/tests/testec.py @@ -35,10 +35,12 @@ cUqktWYGr/GB65Zr5Ky1z/nha2bYCb6U4hTwbJP9CRCZr5hJklXn out=key.exportpriv() self.assertEqual(dump_key(out),dump_key(self.ec1priv)) + self.assertEqual(str(key),dump_pub_key(self.ec1priv)) def test_bignum(self): keyval='\xff'*32 key=create(Oid("secp256k1"),keyval) self.assertEqual(dump_key(key.exportpriv()),dump_key(self.bigkey)) + self.assertEqual(str(key),dump_pub_key(self.bigkey)) if __name__ == "__main__": unittest.main()