ソースを参照

Don't schedule excess_renegotiations_callback unless it's set

Partial fix for bug 4587; reported by "frosty_un".
Nick Mathewson 14 年 前
コミット
617617e21a
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/common/tortls.c

+ 2 - 1
src/common/tortls.c

@@ -1318,7 +1318,8 @@ tor_tls_got_client_hello(tor_tls_t *tls)
     }
     }
 
 
     tls->got_renegotiate = 1;
     tls->got_renegotiate = 1;
-  } else if (tls->server_handshake_count > 2) {
+  } else if (tls->server_handshake_count > 2 &&
+             tls->excess_renegotiations_callback) {
     /* We got more than one renegotiation requests. The Tor protocol
     /* We got more than one renegotiation requests. The Tor protocol
        needs just one renegotiation; more than that probably means
        needs just one renegotiation; more than that probably means
        They are trying to DoS us and we have to stop them. We can't
        They are trying to DoS us and we have to stop them. We can't