#define BASE_SECTION "ca"
-#define CONFIG_FILE "openssl.cnf"
#define ENV_DEFAULT_CA "default_ca"
if (configfile == NULL)
configfile = getenv("SSLEAY_CONF");
if (configfile == NULL) {
- const char *s = X509_get_default_cert_area();
- size_t len;
-
- len = strlen(s) + sizeof(CONFIG_FILE) + 1;
- tofree = malloc(len);
- BUF_strlcpy(tofree, s, len);
- BUF_strlcat(tofree, "/", len);
- BUF_strlcat(tofree, CONFIG_FILE, len);
+ if ((tofree = make_config_name()) == NULL) {
+ BIO_printf(bio_err, "error making config file name\n");
+ goto err;
+ }
configfile = tofree;
}
BIO_printf(bio_err, "Using configuration from %s\n", configfile);
#define BASE_SECTION "srp"
-#define CONFIG_FILE "openssl.cnf"
#define ENV_RANDFILE "RANDFILE"
if (configfile == NULL)
configfile = getenv("SSLEAY_CONF");
if (configfile == NULL) {
- const char *s = X509_get_default_cert_area();
- size_t len;
-
- len = strlen(s) + sizeof(CONFIG_FILE) + 1;
- tofree = malloc(len);
- BUF_strlcpy(tofree, s, len);
- BUF_strlcat(tofree, "/", len);
- BUF_strlcat(tofree, CONFIG_FILE, len);
+ if ((tofree = make_config_name()) == NULL) {
+ BIO_printf(bio_err, "error making config file name\n");
+ goto err;
+ }
configfile = tofree;
}
VERBOSE BIO_printf(bio_err, "Using configuration from %s\n", configfile);