axTLS: allow "default" SSL version as well

When no explicit version is selected we should try to use whatever is
best for us, and in the axTLS case that means TLSv1.
This commit is contained in:
Daniel Stenberg 2010-12-15 10:23:19 +01:00
parent b88ead62e7
commit 9035709e25
1 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,12 @@ Curl_axtls_connect(struct connectdata *conn,
return CURLE_OK;
/* axTLS only supports TLSv1 */
if(data->set.ssl.version != CURL_SSLVERSION_TLSv1) {
/* check to see if we've been told to use an explicit SSL/TLS version */
switch(data->set.ssl.version) {
case CURL_SSLVERSION_DEFAULT:
case CURL_SSLVERSION_TLSv1:
break;
default:
failf(data, "axTLS only supports TLSv1");
return CURLE_SSL_CONNECT_ERROR;
}