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 a84b643fc248d245f10d211cae275e6ced35ff05..f1977148b47a0424cc1a9db07c4eccfa9dc59b43 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 a881fada73df531e52d0e175e5d1c2e0be38d429..bcc5aee94c9c41b687796d538dfdb46f7b5e9f8f 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 */