A number of corrections of the aep engine implementation:
1. rnd_reference was a duplication of the work the the engine framework does, and wasn't ever checked. Removed. 2. use the NO_ macros to disable appropriate algorithms. 3. Only implement the RNG stuff if AEPRAND is defined (default: not defined, because the AEP people plan on having boards without it. I'll see if I can device a more dynamic way of disabling this). 4. aep_finish() now closes all connections, and if that worked, does a proper finalize. 5. proper AEP types are used to conform to the AEP definitions of their own functions. 6. remake the use of thread locks. The use of CRYPTO_LOCK_DYNLOCK was definitely inappropriate, and for random generator stuff, it's better to use CRYPTO_LOCK_RAND. Also, I applied certain changes that were provided by the AEP people. Among others, BN_CTX_new() is not used to initialise a BN context (this was never done before, and may have made things slower or not working at all.
This commit is contained in:
@@ -188,12 +188,15 @@ static ERR_STRING_DATA ENGINE_str_reasons[]=
|
||||
{ENGINE_R_BN_CTX_FULL ,"BN_CTX full"},
|
||||
{ENGINE_R_BN_EXPAND_FAIL ,"bn_expand fail"},
|
||||
{ENGINE_R_CHIL_ERROR ,"chil error"},
|
||||
{ENGINE_R_CLOSE_HANDLES_FAILED ,"close handles failed"},
|
||||
{ENGINE_R_CONFLICTING_ENGINE_ID ,"conflicting engine id"},
|
||||
{ENGINE_R_CONNECTIONS_IN_USE ,"connections in use"},
|
||||
{ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"},
|
||||
{ENGINE_R_DSO_FAILURE ,"DSO failure"},
|
||||
{ENGINE_R_ENGINE_IS_NOT_IN_LIST ,"engine is not in the list"},
|
||||
{ENGINE_R_FAILED_LOADING_PRIVATE_KEY ,"failed loading private key"},
|
||||
{ENGINE_R_FAILED_LOADING_PUBLIC_KEY ,"failed loading public key"},
|
||||
{ENGINE_R_FINALIZE_FAILED ,"finalize failed"},
|
||||
{ENGINE_R_FINISH_FAILED ,"finish failed"},
|
||||
{ENGINE_R_GET_HANDLE_FAILED ,"could not obtain hardware handle"},
|
||||
{ENGINE_R_GET_RANDOM_FAILED ,"get random failed"},
|
||||
|
Reference in New Issue
Block a user