+"""
+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:
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,)