mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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>
This commit is contained in:
+3
-2
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user