Elide OPENSSL_INIT_set_config_filename() for no-stdio build

Strictly speaking, it isn't stdio and file access which offend me here;
it's the fact that UEFI doesn't provide a strdup() function. But the
fact that it's pointless without file access is a good enough excuse for
compiling it out.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
David Woodhouse 2016-02-22 16:44:46 +00:00 committed by Rich Salz
parent b9bd7b06cc
commit 691064c47f
2 changed files with 4 additions and 0 deletions

View File

@ -387,12 +387,14 @@ OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void)
}
#ifndef OPENSSL_NO_STDIO
void OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings,
const char *config_file)
{
free(settings->config_name);
settings->config_name = config_file == NULL ? NULL : strdup(config_file);
}
#endif
void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings)
{

View File

@ -565,8 +565,10 @@ void OPENSSL_thread_stop(void);
/* Low-level control of initialization */
OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void);
#ifndef OPENSSL_NO_STDIO
void OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings,
const char *config_file);
#endif
void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings);
/* BEGIN ERROR CODES */