]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Do not set the hostname TLS extension server-side; only client-side
authorNick Mathewson <nickm@torproject.org>
Sun, 21 Nov 2010 03:21:50 +0000 (22:21 -0500)
committerNick Mathewson <nickm@torproject.org>
Sun, 21 Nov 2010 03:21:50 +0000 (22:21 -0500)
This may fix bug 2204, and resolve the incompatibility with openssl
0.9.8p/1.0.0b.

changes/fix2204 [new file with mode: 0644]
src/common/tortls.c

diff --git a/changes/fix2204 b/changes/fix2204
new file mode 100644 (file)
index 0000000..fb2771a
--- /dev/null
@@ -0,0 +1,7 @@
+  o Major bugfixes
+    - Do not set the tlsext_host_name extension on server SSL objects;
+      only on client SSL objects.  We set it to immitate a browser, not a
+      vhosting server. This resolves an incompatibility with openssl 0.9.8p
+      and openssl 1.0.0b.  Fixes bug 2204; bugfix on 0.2.1.1-alpha.
+
+
index 25f21a98920bc6c6844f161762eeb2692409d4b2..2915f79195f2dbbdd6569e14cc95caecb1df05b9 100644 (file)
@@ -898,7 +898,7 @@ tor_tls_new(int sock, int isServer)
 
 #ifdef SSL_set_tlsext_host_name
   /* Browsers use the TLS hostname extension, so we should too. */
-  {
+  if (!isServer) {
     char *fake_hostname = crypto_random_hostname(4,25, "www.",".com");
     SSL_set_tlsext_host_name(result->ssl, fake_hostname);
     tor_free(fake_hostname);