]> granicus.if.org Git - curl/commitdiff
axTLS: allow "default" SSL version as well
authorDaniel Stenberg <daniel@haxx.se>
Wed, 15 Dec 2010 09:23:19 +0000 (10:23 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 15 Dec 2010 15:05:17 +0000 (16:05 +0100)
When no explicit version is selected we should try to use whatever is
best for us, and in the axTLS case that means TLSv1.

lib/axtls.c

index 80c3554ee0bc8763976a606909c1aa340d431cf2..855b554b43893023436d95fa9d9185a765e1a898 100644 (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;
   }