|
@@ -1879,6 +1879,7 @@ rend_service_receive_introduction(origin_circuit_t *circuit,
|
|
time_t now = time(NULL);
|
|
time_t now = time(NULL);
|
|
time_t elapsed;
|
|
time_t elapsed;
|
|
int replay;
|
|
int replay;
|
|
|
|
+ size_t keylen;
|
|
|
|
|
|
|
|
|
|
if (circuit->base_.purpose != CIRCUIT_PURPOSE_S_INTRO) {
|
|
if (circuit->base_.purpose != CIRCUIT_PURPOSE_S_INTRO) {
|
|
@@ -1953,9 +1954,10 @@ rend_service_receive_introduction(origin_circuit_t *circuit,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ keylen = crypto_pk_keysize(intro_key);
|
|
replay = replaycache_add_test_and_elapsed(
|
|
replay = replaycache_add_test_and_elapsed(
|
|
intro_point->accepted_intro_rsa_parts,
|
|
intro_point->accepted_intro_rsa_parts,
|
|
- parsed_req->ciphertext, parsed_req->ciphertext_len,
|
|
+ parsed_req->ciphertext, MIN(parsed_req->ciphertext_len, keylen),
|
|
&elapsed);
|
|
&elapsed);
|
|
|
|
|
|
if (replay) {
|
|
if (replay) {
|
|
@@ -3974,6 +3976,10 @@ remove_invalid_intro_points(rend_service_t *service,
|
|
log_info(LD_REND, "Expiring %s as intro point for %s.",
|
|
log_info(LD_REND, "Expiring %s as intro point for %s.",
|
|
safe_str_client(extend_info_describe(intro->extend_info)),
|
|
safe_str_client(extend_info_describe(intro->extend_info)),
|
|
safe_str_client(service->service_id));
|
|
safe_str_client(service->service_id));
|
|
|
|
+
|
|
|
|
+ if (retry_nodes) {
|
|
|
|
+ smartlist_remove(retry_nodes, intro);
|
|
|
|
+ }
|
|
smartlist_add(service->expiring_nodes, intro);
|
|
smartlist_add(service->expiring_nodes, intro);
|
|
SMARTLIST_DEL_CURRENT(service->intro_nodes, intro);
|
|
SMARTLIST_DEL_CURRENT(service->intro_nodes, intro);
|
|
|
|
|