Elide OPENSSL_INIT_set_config_filename() for no-stdio build
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 22 Feb 2016 16:44:46 +0000 (16:44 +0000)
committerRich Salz <rsalz@openssl.org>
Mon, 7 Mar 2016 19:51:08 +0000 (14:51 -0500)
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>
crypto/conf/conf_lib.c
include/openssl/crypto.h

index a84b643..f197714 100644 (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)
 {
index a881fad..bcc5aee 100644 (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 */