Allow soft-loading engines.
This commit is contained in:
parent
f58d0f70b6
commit
b7c8b4fc95
4
CHANGES
4
CHANGES
@ -22,6 +22,10 @@
|
|||||||
This work was sponsored by Logica.
|
This work was sponsored by Logica.
|
||||||
[Steve Henson]
|
[Steve Henson]
|
||||||
|
|
||||||
|
*) Allow engines to be "soft loaded" - i.e. optionally don't die if
|
||||||
|
the load fails. Useful for distros.
|
||||||
|
[Ben Laurie and the FreeBSD team]
|
||||||
|
|
||||||
Changes between 0.9.8g and 0.9.8h [28 May 2008]
|
Changes between 0.9.8g and 0.9.8h [28 May 2008]
|
||||||
|
|
||||||
*) Fix flaw if 'Server Key exchange message' is omitted from a TLS
|
*) Fix flaw if 'Server Key exchange message' is omitted from a TLS
|
||||||
|
@ -512,6 +512,7 @@ my %table=(
|
|||||||
"darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc64.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc64.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
|
"debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -fomit-frame-pointer -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::osx_ppc32.o::::::::::dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||||
|
|
||||||
|
@ -273,9 +273,21 @@ int main(int Argc, char *Argv[])
|
|||||||
i=NCONF_load(config,p,&errline);
|
i=NCONF_load(config,p,&errline);
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
NCONF_free(config);
|
if (ERR_GET_REASON(ERR_peek_last_error())
|
||||||
config = NULL;
|
== CONF_R_NO_SUCH_FILE)
|
||||||
ERR_clear_error();
|
{
|
||||||
|
BIO_printf(bio_err,
|
||||||
|
"WARNING: can't open config file: %s\n",p);
|
||||||
|
ERR_clear_error();
|
||||||
|
NCONF_free(config);
|
||||||
|
config = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ERR_print_errors(bio_err);
|
||||||
|
NCONF_free(config);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prog=prog_init();
|
prog=prog_init();
|
||||||
|
@ -98,6 +98,8 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
|
|||||||
CONF_VALUE *ecmd;
|
CONF_VALUE *ecmd;
|
||||||
char *ctrlname, *ctrlvalue;
|
char *ctrlname, *ctrlvalue;
|
||||||
ENGINE *e = NULL;
|
ENGINE *e = NULL;
|
||||||
|
int soft = 0;
|
||||||
|
|
||||||
name = skip_dot(name);
|
name = skip_dot(name);
|
||||||
#ifdef ENGINE_CONF_DEBUG
|
#ifdef ENGINE_CONF_DEBUG
|
||||||
fprintf(stderr, "Configuring engine %s\n", name);
|
fprintf(stderr, "Configuring engine %s\n", name);
|
||||||
@ -125,6 +127,8 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
|
|||||||
/* Override engine name to use */
|
/* Override engine name to use */
|
||||||
if (!strcmp(ctrlname, "engine_id"))
|
if (!strcmp(ctrlname, "engine_id"))
|
||||||
name = ctrlvalue;
|
name = ctrlvalue;
|
||||||
|
else if (!strcmp(ctrlname, "soft_load"))
|
||||||
|
soft = 1;
|
||||||
/* Load a dynamic ENGINE */
|
/* Load a dynamic ENGINE */
|
||||||
else if (!strcmp(ctrlname, "dynamic_path"))
|
else if (!strcmp(ctrlname, "dynamic_path"))
|
||||||
{
|
{
|
||||||
@ -147,6 +151,11 @@ static int int_engine_configure(char *name, char *value, const CONF *cnf)
|
|||||||
if (!e)
|
if (!e)
|
||||||
{
|
{
|
||||||
e = ENGINE_by_id(name);
|
e = ENGINE_by_id(name);
|
||||||
|
if (!e && soft)
|
||||||
|
{
|
||||||
|
ERR_clear_error();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (!e)
|
if (!e)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user