Parcourir la source

Merge branch 'fix2204' into maint-0.2.1

Nick Mathewson il y a 13 ans
Parent
commit
a9d2148f53
2 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 7 0
      changes/fix2204
  2. 1 1
      src/common/tortls.c

+ 7 - 0
changes/fix2204

@@ -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.
+
+

+ 1 - 1
src/common/tortls.c

@@ -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);