diff options
author | Rich Salz <rsalz@openssl.org> | 2016-06-12 21:49:40 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-06-14 12:30:37 -0400 |
commit | cda3ae5bd0798c56fef5a5c1462d51ca1776504e (patch) | |
tree | 3fcc90ce98682102ec3c07e65c7e086a7d70a603 /crypto/conf | |
parent | 036e61b1669fee477af2d5d1afd0b015517f7f9a (diff) |
RT4562: Fix misleading doc on OPENSSL_config
Also changed the code to use "appname" not "filename"
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/conf')
-rw-r--r-- | crypto/conf/conf_lib.c | 18 | ||||
-rw-r--r-- | crypto/conf/conf_sap.c | 10 |
2 files changed, 14 insertions, 14 deletions
diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index c99837387e..3532114917 100644 --- a/crypto/conf/conf_lib.c +++ b/crypto/conf/conf_lib.c @@ -340,19 +340,19 @@ OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void) #ifndef OPENSSL_NO_STDIO -int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings, - const char *config_file) +int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings, + const char *appname) { - char *new_config_file = NULL; + char *newappname = NULL; - if (config_file != NULL) { - new_config_file = strdup(config_file); - if (new_config_file == NULL) + if (appname != NULL) { + newappname = strdup(appname); + if (newappname == NULL) return 0; } - free(settings->config_name); - settings->config_name = new_config_file; + free(settings->appname); + settings->appname = newappname; return 1; } @@ -360,6 +360,6 @@ int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings, void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings) { - free(settings->config_name); + free(settings->appname); free(settings); } diff --git a/crypto/conf/conf_sap.c b/crypto/conf/conf_sap.c index a1c25b3ee6..bed95abea4 100644 --- a/crypto/conf/conf_sap.c +++ b/crypto/conf/conf_sap.c @@ -24,18 +24,18 @@ static int openssl_configured = 0; #if OPENSSL_API_COMPAT < 0x10100000L -void OPENSSL_config(const char *config_name) +void OPENSSL_config(const char *appname) { OPENSSL_INIT_SETTINGS settings; memset(&settings, 0, sizeof(settings)); - if (config_name != NULL) - settings.config_name = strdup(config_name); + if (appname != NULL) + settings.appname = strdup(appname); OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, &settings); } #endif -void openssl_config_int(const char *config_name) +void openssl_config_int(const char *appname) { if (openssl_configured) return; @@ -47,7 +47,7 @@ void openssl_config_int(const char *config_name) #endif ERR_clear_error(); #ifndef OPENSSL_SYS_UEFI - CONF_modules_load_file(NULL, config_name, + CONF_modules_load_file(NULL, appname, CONF_MFLAGS_DEFAULT_SECTION | CONF_MFLAGS_IGNORE_MISSING_FILE); #endif |