mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 23:14:37 +08:00
Handle differences between engine IDs and their dynamic library names (and
source files, for that matter) by tolerating the alternatives. It would be preferable to also change the generated shared library names, but that will be taken up separately.
This commit is contained in:
parent
85991994df
commit
60192e96b8
@ -202,6 +202,8 @@ static RAND_METHOD ibm_4758_cca_rand =
|
|||||||
|
|
||||||
static const char *engine_4758_cca_id = "4758cca";
|
static const char *engine_4758_cca_id = "4758cca";
|
||||||
static const char *engine_4758_cca_name = "IBM 4758 CCA hardware engine support";
|
static const char *engine_4758_cca_name = "IBM 4758 CCA hardware engine support";
|
||||||
|
/* Compatibility hack, the dynamic library uses this form in the path */
|
||||||
|
static const char *engine_4758_cca_id_alt = "4758_cca";
|
||||||
|
|
||||||
/* engine implementation */
|
/* engine implementation */
|
||||||
/*-----------------------*/
|
/*-----------------------*/
|
||||||
@ -958,7 +960,8 @@ static void cca_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, int idx,
|
|||||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||||
static int bind_fn(ENGINE *e, const char *id)
|
static int bind_fn(ENGINE *e, const char *id)
|
||||||
{
|
{
|
||||||
if(id && (strcmp(id, engine_4758_cca_id) != 0))
|
if(id && (strcmp(id, engine_4758_cca_id) != 0) &&
|
||||||
|
(strcmp(id, engine_4758_cca_id_alt) != 0))
|
||||||
return 0;
|
return 0;
|
||||||
if(!bind_helper(e))
|
if(!bind_helper(e))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -224,6 +224,8 @@ static RAND_METHOD hwcrhk_rand =
|
|||||||
/* Constants used when creating the ENGINE */
|
/* Constants used when creating the ENGINE */
|
||||||
static const char *engine_hwcrhk_id = "chil";
|
static const char *engine_hwcrhk_id = "chil";
|
||||||
static const char *engine_hwcrhk_name = "nCipher hardware engine support";
|
static const char *engine_hwcrhk_name = "nCipher hardware engine support";
|
||||||
|
/* Compatibility hack, the dynamic library uses this form in the path */
|
||||||
|
static const char *engine_hwcrhk_id_alt = "ncipher";
|
||||||
|
|
||||||
/* Internal stuff for HWCryptoHook */
|
/* Internal stuff for HWCryptoHook */
|
||||||
|
|
||||||
@ -1343,7 +1345,8 @@ static void hwcrhk_log_message(void *logstr, const char *message)
|
|||||||
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
#ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
||||||
static int bind_fn(ENGINE *e, const char *id)
|
static int bind_fn(ENGINE *e, const char *id)
|
||||||
{
|
{
|
||||||
if(id && (strcmp(id, engine_hwcrhk_id) != 0))
|
if(id && (strcmp(id, engine_hwcrhk_id) != 0) &&
|
||||||
|
(strcmp(id, engine_hwcrhk_id_alt) != 0))
|
||||||
return 0;
|
return 0;
|
||||||
if(!bind_helper(e))
|
if(!bind_helper(e))
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user