mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 21:53:48 +01:00
6bacc3c7a8
One of the goals of this change is to have trunnel API/ABI being more explicit so we namespace them with "trn_*". Furthermore, we can now create hs_cells.[ch] without having to confuse it with trunnel which used to be "hs_cell_*" before that change. Here are the perl line that were used for this rename: perl -i -pe 's/cell_extension/trn_cell_extension/g;' src/*/*.[ch] perl -i -pe 's/cell_extension/trn_cell_extension/g;' src/trunnel/hs/*.trunnel perl -i -pe 's/hs_cell_/trn_cell_/g;' src/*/*.[ch] perl -i -pe 's/hs_cell_/trn_cell_/g;' src/trunnel/hs/*.trunnel And then "./scripts/codegen/run_trunnel.sh" with trunnel commit id 613fb1b98e58504e2b84ef56b1602b6380629043. Fixes #21919 Signed-off-by: David Goulet <dgoulet@torproject.org>
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
/*
|
|
* This contains the definition of the ESTABLISH_INTRO and INTRO_ESTABLISHED
|
|
* cell for onion service version 3 and onward. The following format is
|
|
* specified in proposal 224 section 3.1.
|
|
*/
|
|
|
|
extern struct trn_cell_extension;
|
|
|
|
const TRUNNEL_SHA3_256_LEN = 32;
|
|
|
|
/* ESTABLISH_INTRO payload. See details in section 3.1.1 */
|
|
struct trn_cell_establish_intro {
|
|
/* Indicate the start of the handshake authentication data. */
|
|
@ptr start_cell;
|
|
|
|
/* Authentication key material. */
|
|
u8 auth_key_type IN [0x00, 0x01, 0x02];
|
|
u16 auth_key_len;
|
|
u8 auth_key[auth_key_len];
|
|
|
|
/* Extension(s). Reserved fields. */
|
|
struct trn_cell_extension extensions;
|
|
@ptr end_mac_fields;
|
|
|
|
/* Handshake MAC. */
|
|
u8 handshake_mac[TRUNNEL_SHA3_256_LEN];
|
|
|
|
/* Signature */
|
|
/* Indicate the end of the handshake authentication data. */
|
|
@ptr end_sig_fields;
|
|
u16 sig_len;
|
|
u8 sig[sig_len];
|
|
};
|
|
|
|
/* INTRO_ESTABLISHED payload which is an acknowledge of the ESTABLISH_INTRO
|
|
* cell. For legacy node, this payload is empty so the following only applies
|
|
* to version >= 3. */
|
|
struct trn_cell_intro_established {
|
|
/* Extension(s). Reserved fields. */
|
|
struct trn_cell_extension extensions;
|
|
};
|