[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Remove empty rend_service_validate_intro_early function



commit e03eaa3c4a4b3208b319aadfb125aa1e606adaec
Author: John Brooks <john.brooks@xxxxxxxxxxxxxxxx>
Date:   Tue Jul 14 02:28:25 2015 -0400

    Remove empty rend_service_validate_intro_early function
---
 src/or/rendservice.c |   42 ------------------------------------------
 src/or/rendservice.h |    2 --
 2 files changed, 44 deletions(-)

diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 6c5ca49..74e8a8d 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1538,17 +1538,6 @@ rend_service_receive_introduction(origin_circuit_t *circuit,
     tor_free(err_msg);
   }
 
-  stage_descr = "early validation";
-  /* Early validation of pk/ciphertext part */
-  result = rend_service_validate_intro_early(parsed_req, &err_msg);
-  if (result < 0) {
-    goto log_error;
-  } else if (err_msg) {
-    log_info(LD_REND, "%s on circ %u.", err_msg,
-             (unsigned)circuit->base_.n_circ_id);
-    tor_free(err_msg);
-  }
-
   /* make sure service replay caches are present */
   if (!service->accepted_intro_dh_parts) {
     service->accepted_intro_dh_parts =
@@ -2515,37 +2504,6 @@ rend_service_parse_intro_plaintext(
   return status;
 }
 
-/** Do validity checks on a parsed intro cell before decryption; some of
- * these are not done in rend_service_begin_parse_intro() itself because
- * they depend on a lot of other state and would make it hard to unit test.
- * Returns >= 0 if successful or < 0 if the intro cell is invalid, and
- * optionally writes out an error message for logging.  If an err_msg
- * pointer is provided, it is the caller's responsibility to free any
- * provided message.
- */
-
-int
-rend_service_validate_intro_early(const rend_intro_cell_t *intro,
-                                  char **err_msg_out)
-{
-  int status = 0;
-
-  if (!intro) {
-    if (err_msg_out)
-      *err_msg_out =
-        tor_strdup("NULL intro cell passed to "
-                   "rend_service_validate_intro_early()");
-
-    status = -1;
-    goto err;
-  }
-
-  /* TODO */
-
- err:
-  return status;
-}
-
 /** Do validity checks on a parsed intro cell after decryption; some of
  * these are not done in rend_service_parse_intro_plaintext() itself because
  * they depend on a lot of other state and would make it hard to unit test.
diff --git a/src/or/rendservice.h b/src/or/rendservice.h
index 37d9da4..a16a99c 100644
--- a/src/or/rendservice.h
+++ b/src/or/rendservice.h
@@ -93,8 +93,6 @@ rend_intro_cell_t * rend_service_begin_parse_intro(const uint8_t *request,
                                                    char **err_msg_out);
 int rend_service_parse_intro_plaintext(rend_intro_cell_t *intro,
                                        char **err_msg_out);
-int rend_service_validate_intro_early(const rend_intro_cell_t *intro,
-                                      char **err_msg_out);
 int rend_service_validate_intro_late(const rend_intro_cell_t *intro,
                                      char **err_msg_out);
 void rend_service_relaunch_rendezvous(origin_circuit_t *oldcirc);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits