提交 691064c4 编写于 作者: D David Woodhouse 提交者: Rich Salz

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: NTim Hudson <tjh@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 b9bd7b06
......@@ -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)
{
......
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册