This change replaces the ENGINE's underlying mechanics with the new
ENGINE_TABLE-based stuff - as described in crypto/engine/README. Associated miscellaneous changes; - the previous cipher/digest hooks that hardwired directly to EVP's OBJ_NAME-based storage have been backed out. New cipher/digest support has been constructed and will be committed shortly. - each implementation defines its own ENGINE_load_<name> function now. - the "openssl" ENGINE isn't needed or loaded any more. - core (not algorithm or class specific) ENGINE code has been split into multiple files to increase readability and decrease linker bloat. - ENGINE_cpy() has been removed as it wasn't really a good idea in the first place and now, because of registration issues, can't be meaningfully defined any more. - BN_MOD_EXP[_CRT] support is removed as per the README. - a bug in enginetest.c has been fixed. NB: This commit almost certainly breaks compilation until subsequent changes are committed.
This commit is contained in:
@@ -276,8 +276,6 @@ static int bind_helper(ENGINE *e)
|
||||
#ifndef OPENSSL_NO_DH
|
||||
!ENGINE_set_DH(e, &cswift_dh) ||
|
||||
#endif
|
||||
!ENGINE_set_BN_mod_exp(e, &cswift_mod_exp) ||
|
||||
!ENGINE_set_BN_mod_exp_crt(e, &cswift_mod_exp_crt) ||
|
||||
!ENGINE_set_destroy_function(e, cswift_destroy) ||
|
||||
!ENGINE_set_init_function(e, cswift_init) ||
|
||||
!ENGINE_set_finish_function(e, cswift_finish) ||
|
||||
@@ -312,9 +310,7 @@ static int bind_helper(ENGINE *e)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* As this is only ever called once, there's no need for locking
|
||||
* (indeed - the lock will already be held by our caller!!!) */
|
||||
ENGINE *ENGINE_cswift(void)
|
||||
static ENGINE *engine_cswift(void)
|
||||
{
|
||||
ENGINE *ret = ENGINE_new();
|
||||
if(!ret)
|
||||
@@ -327,6 +323,16 @@ ENGINE *ENGINE_cswift(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ENGINE_load_cswift(void)
|
||||
{
|
||||
/* Copied from eng_[openssl|dyn].c */
|
||||
ENGINE *toadd = engine_cswift();
|
||||
if(!toadd) return;
|
||||
ENGINE_add(toadd);
|
||||
ENGINE_free(toadd);
|
||||
ERR_clear_error();
|
||||
}
|
||||
|
||||
/* This is a process-global DSO handle used for loading and unloading
|
||||
* the CryptoSwift library. NB: This is only set (or unset) during an
|
||||
* init() or finish() call (reference counts permitting) and they're
|
||||
|
||||
Reference in New Issue
Block a user