diff options
author | David Goulet <dgoulet@torproject.org> | 2016-12-16 12:18:05 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-12-16 12:21:07 -0500 |
commit | e76b072defa5f5d6f5429d4df9afdd1335591658 (patch) | |
tree | 3314570497b1a71b441eaf7a0d3f357d82acf1a7 /src/or/hs_service.c | |
parent | db0e926849954b36f3eeba274308f2c9bb8292f1 (diff) | |
download | tor-e76b072defa5f5d6f5429d4df9afdd1335591658.tar.gz tor-e76b072defa5f5d6f5429d4df9afdd1335591658.zip |
test: fix the generate ESTABLISH_INTRO v3 cell
The "sig_len" fields was moved below the "end_sig_fields" in the trunnel
specification so when signing the cell content, the function generating such a
cell needed to be adjust.
Closes #20991
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r-- | src/or/hs_service.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c index 3b5a3e7853..7b12b63065 100644 --- a/src/or/hs_service.c +++ b/src/or/hs_service.c @@ -152,8 +152,9 @@ generate_establish_intro_cell(const uint8_t *circuit_key_material, tor_assert(encoded_len > ED25519_SIG_LEN); if (ed25519_sign_prefixed(&sig, - (uint8_t*) cell_bytes_tmp, - encoded_len - ED25519_SIG_LEN, + cell_bytes_tmp, + encoded_len - + (ED25519_SIG_LEN + sizeof(cell->sig_len)), ESTABLISH_INTRO_SIG_PREFIX, &key_struct)) { log_warn(LD_BUG, "Unable to gen signature for ESTABLISH_INTRO cell."); |