Don't ignore config_name parameter passed to OPENSSL_config(). Use
"openssl_conf" in config file if config_name variable is missing.
This commit is contained in:
parent
0cc361f3e7
commit
d318fb79d2
@ -115,6 +115,7 @@ typedef void conf_finish_func(CONF_IMODULE *md);
|
|||||||
#define CONF_MFLAGS_SILENT 0x4
|
#define CONF_MFLAGS_SILENT 0x4
|
||||||
#define CONF_MFLAGS_NO_DSO 0x8
|
#define CONF_MFLAGS_NO_DSO 0x8
|
||||||
#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
||||||
|
#define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
||||||
|
|
||||||
int CONF_set_default_method(CONF_METHOD *meth);
|
int CONF_set_default_method(CONF_METHOD *meth);
|
||||||
void CONF_set_nconf(CONF *conf,LHASH *hash);
|
void CONF_set_nconf(CONF *conf,LHASH *hash);
|
||||||
|
@ -126,18 +126,19 @@ int CONF_modules_load(const CONF *cnf, const char *appname,
|
|||||||
{
|
{
|
||||||
STACK_OF(CONF_VALUE) *values;
|
STACK_OF(CONF_VALUE) *values;
|
||||||
CONF_VALUE *vl;
|
CONF_VALUE *vl;
|
||||||
char *vsection;
|
char *vsection = NULL;
|
||||||
|
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
if (!cnf)
|
if (!cnf)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (appname == NULL)
|
if (appname)
|
||||||
appname = "openssl_conf";
|
|
||||||
|
|
||||||
vsection = NCONF_get_string(cnf, NULL, appname);
|
vsection = NCONF_get_string(cnf, NULL, appname);
|
||||||
|
|
||||||
|
if (!appname || (!vsection && (flags & CONF_MFLAGS_DEFAULT_SECTION)))
|
||||||
|
vsection = NCONF_get_string(cnf, NULL, "openssl_conf");
|
||||||
|
|
||||||
if (!vsection)
|
if (!vsection)
|
||||||
{
|
{
|
||||||
ERR_clear_error();
|
ERR_clear_error();
|
||||||
|
@ -88,8 +88,8 @@ void OPENSSL_config(const char *config_name)
|
|||||||
|
|
||||||
|
|
||||||
ERR_clear_error();
|
ERR_clear_error();
|
||||||
if (CONF_modules_load_file(NULL, NULL,
|
if (CONF_modules_load_file(NULL, config_name,
|
||||||
CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0)
|
CONF_MFLAGS_DEFAULT_SECTION|CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0)
|
||||||
{
|
{
|
||||||
BIO *bio_err;
|
BIO *bio_err;
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user