Skip to content

Commit

Permalink
Merge dfc5be9 into 63e58b8
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrykos committed Dec 11, 2017
2 parents 63e58b8 + dfc5be9 commit b50dfde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/vtls/vtls.c
Expand Up @@ -1260,6 +1260,7 @@ static size_t Curl_multissl_version(char *buffer, size_t size)
static int multissl_init(const struct Curl_ssl *backend)
{
const char *env;
char *env_tmp;
int i;

if(Curl_ssl != &Curl_ssl_multi)
Expand All @@ -1273,7 +1274,7 @@ static int multissl_init(const struct Curl_ssl *backend)
if(!available_backends[0])
return 1;

env = getenv("CURL_SSL_BACKEND");
env = env_tmp = curl_getenv("CURL_SSL_BACKEND");
#ifdef CURL_DEFAULT_SSL_BACKEND
if(!env)
env = CURL_DEFAULT_SSL_BACKEND;
Expand All @@ -1282,13 +1283,15 @@ static int multissl_init(const struct Curl_ssl *backend)
for(i = 0; available_backends[i]; i++) {
if(strcasecompare(env, available_backends[i]->info.name)) {
Curl_ssl = available_backends[i];
curl_free(env_tmp);
return 0;
}
}
}

/* Fall back to first available backend */
Curl_ssl = available_backends[0];
curl_free(env_tmp);
return 0;
}

Expand Down

0 comments on commit b50dfde

Please sign in to comment.