]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Only disable cert chaining on the first TLS handshake
authorNick Mathewson <nickm@torproject.org>
Fri, 27 Apr 2012 16:13:56 +0000 (12:13 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 27 Apr 2012 16:13:56 +0000 (12:13 -0400)
If the client uses a v2 cipherlist on the renegotiation handshake,
it looks as if they could fail to get a good cert chain from the
server, since they server would re-disable certificate chaining.

This patch makes it so the code that make the server side of the
first v2 handshake special can get called only once.

Fix for 4591; bugfix on 0.2.0.20-rc.

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

diff --git a/changes/bug4591 b/changes/bug4591
new file mode 100644 (file)
index 0000000..59b25a5
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+    - If the client fails to set a reasonable set of ciphersuites
+      during its v2 handshake renegotiation, allow the renegotiation
+      to continue nevertheless (i.e., send all the required
+      certificates). Fix for bug 4591; bugfix on 0.2.0.20-rc.
+
index 4c9d2188d4b2ef7b0ad476941ea5e3c37b1a7d80..abdd411dfbcf8d1886056ff376b51b0902bcbaf1 100644 (file)
@@ -965,7 +965,9 @@ tor_tls_server_info_callback(const SSL *ssl, int type, int val)
 
   /* Now check the cipher list. */
   if (tor_tls_client_is_using_v2_ciphers(ssl, ADDR(tls))) {
-    /*XXXX_TLS keep this from happening more than once! */
+    if (tls->wasV2Handshake)
+      return; /* We already turned this stuff off for the first handshake;
+               * This is a renegotiation. */
 
     /* Yes, we're casting away the const from ssl.  This is very naughty of us.
      * Let's hope openssl doesn't notice! */