]> granicus.if.org Git - curl/commitdiff
darwinssl: Warn that disabling host verify also disables SNI
authorJDepooter <joel.depooter@safe.com>
Thu, 2 Feb 2017 21:40:16 +0000 (13:40 -0800)
committerJay Satiro <raysatiro@yahoo.com>
Thu, 2 Mar 2017 07:42:15 +0000 (02:42 -0500)
In DarwinSSL the SSLSetPeerDomainName function is used to enable both
sending SNI and verifying the host. When host verification is disabled
the function cannot be called, therefore SNI is disabled as well.

Closes https://github.com/curl/curl/pull/1240

docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3
lib/vtls/darwinssl.c

index 159147327fb72809adbbc011786924d36201004b..acadd07746ec095490cbb7dbfa0d39b51de64a8d 100644 (file)
@@ -58,9 +58,16 @@ The default value for this option is 2.
 
 This option controls checking the server's certificate's claimed identity.
 The server could be lying.  To control lying, see
-\fICURLOPT_SSL_VERIFYPEER(3)\fP.  If libcurl is built against NSS and
-\fICURLOPT_SSL_VERIFYPEER(3)\fP is zero, \fICURLOPT_SSL_VERIFYHOST(3)\fP is
-also set to zero and cannot be overridden.
+\fICURLOPT_SSL_VERIFYPEER(3)\fP.
+.SH LIMITATIONS
+DarwinSSL: If \fIverify\fP value is 0, then SNI is also disabled. SNI is a TLS
+extension that sends the hostname to the server. The server may use that
+information to do such things as sending back a specific certificate for the
+hostname, or forwarding the request to a specific origin server. Some hostnames
+may be inaccessible if SNI is not sent.
+
+NSS: If \fICURLOPT_SSL_VERIFYPEER(3)\fP is zero,
+\fICURLOPT_SSL_VERIFYHOST(3)\fP is also set to zero and cannot be overridden.
 .SH DEFAULT
 2
 .SH PROTOCOLS
index 050bf960b5ea20a4e6b7566664415af2debfa57b..25a8ab8b6dd647d7c173ae1ec6b6582d2cddaa1a 100644 (file)
@@ -1425,6 +1425,9 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn,
             "the OS.\n");
     }
   }
+  else {
+    infof(data, "WARNING: disabling hostname validation also disables SNI.\n");
+  }
 
   /* Disable cipher suites that ST supports but are not safe. These ciphers
      are unlikely to be used in any case since ST gives other ciphers a much