summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Brooks <john.brooks@dereferenced.net>2015-07-14 02:28:25 -0400
committerJohn Brooks <john.brooks@dereferenced.net>2015-07-14 02:30:04 -0400
commite03eaa3c4a4b3208b319aadfb125aa1e606adaec (patch)
tree28aa8b08f4a148439a5348d58354ada551304aad
parentcdc5debfde33d196be84863818d7dbaceab2a829 (diff)
downloadtor-e03eaa3c4a4b3208b319aadfb125aa1e606adaec.tar.gz
tor-e03eaa3c4a4b3208b319aadfb125aa1e606adaec.zip
Remove empty rend_service_validate_intro_early function
-rw-r--r--src/or/rendservice.c42
-rw-r--r--src/or/rendservice.h2
2 files changed, 0 insertions, 44 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 6c5ca49528..74e8a8d5ec 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 37d9da4cb5..a16a99cf88 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);