Преглед изворни кода

Do not invoke tls_renegotiated_cb for non-bufferevent connections too early.

This is not the most beautiful fix for this problem, but it is the simplest.

Bugfix for 2205.  Thanks to Sebastian and Mashael for finding the
bug, and boboper/cypherpunks for figuring out why it was happening
and how to fix it, and for writing a few fixes.
Nick Mathewson пре 15 година
родитељ
комит
8fa4450fde
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      src/or/connection_or.c

+ 2 - 0
src/or/connection_or.c

@@ -240,12 +240,14 @@ connection_or_process_inbuf(or_connection_t *conn)
       }
 
       return ret;
+#ifdef USE_BUFFEREVENTS
     case OR_CONN_STATE_TLS_SERVER_RENEGOTIATING:
       if (tor_tls_server_got_renegotiate(conn->tls))
         connection_or_tls_renegotiated_cb(conn->tls, conn);
       if (conn->_base.marked_for_close)
         return 0;
       /* fall through. */
+#endif
     case OR_CONN_STATE_OPEN:
     case OR_CONN_STATE_OR_HANDSHAKING:
       return connection_or_process_cells_from_inbuf(conn);