X-Git-Url: https://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=ctypescrypto%2Fengine.py;h=dd7c0281b34a255670d55ab868322128b10a3d93;hb=911a7fb801bfd74cb50b08fa77ae5c50d1890d8d;hp=47f4878d72d9c542a5659002302d72375c46c5b5;hpb=1ff9b1899959673512927b6afa317855908b7073;p=oss%2Fctypescrypto.git diff --git a/ctypescrypto/engine.py b/ctypescrypto/engine.py index 47f4878..dd7c028 100644 --- a/ctypescrypto/engine.py +++ b/ctypescrypto/engine.py @@ -1,9 +1,16 @@ +""" +engine loading and configuration +""" from ctypes import * from ctypescrypto import libcrypto from ctypescrypto.exception import LibCryptoError default=None def set_default(engine): + """ + Loads specified engine and sets it as default for all + algorithms, supported by it + """ global default e=libcrypto.ENGINE_by_id(engine) if e is None: @@ -25,3 +32,4 @@ libcrypto.ENGINE_by_id.restype=c_void_p libcrypto.ENGINE_by_id.argtypes=(c_char_p,) 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,)