diff options
author | David Goulet <dgoulet@torproject.org> | 2016-11-10 16:04:23 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-01-18 16:58:33 -0500 |
commit | e1497744c8887c883541d3cb6d3d63d9ab51f9ad (patch) | |
tree | 654c90735fe64e8e126c3949f4d612b0deee1e7d /src/or/hs_intropoint.h | |
parent | cacfd82c8dcc74ef8d96c0051649b5eae3e31d61 (diff) | |
download | tor-e1497744c8887c883541d3cb6d3d63d9ab51f9ad.tar.gz tor-e1497744c8887c883541d3cb6d3d63d9ab51f9ad.zip |
prop224: Add INTRODUCE1 cell relay support
Closes #20029
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_intropoint.h')
-rw-r--r-- | src/or/hs_intropoint.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h index 46d8d6f7de..e1bad47fc8 100644 --- a/src/or/hs_intropoint.h +++ b/src/or/hs_intropoint.h @@ -16,9 +16,19 @@ enum hs_intro_auth_key_type { HS_INTRO_AUTH_KEY_TYPE_ED25519 = 0x02, }; +/* INTRODUCE_ACK status code. */ +typedef enum { + HS_INTRO_ACK_STATUS_SUCCESS = 0x0000, + HS_INTRO_ACK_STATUS_UNKNOWN_ID = 0x0001, + HS_INTRO_ACK_STATUS_BAD_FORMAT = 0x0002, + HS_INTRO_ACK_STATUS_CANT_RELAY = 0x0003, +} hs_intro_ack_status_t; + int hs_intro_received_establish_intro(or_circuit_t *circ, const uint8_t *request, size_t request_len); +int hs_intro_received_introduce1(or_circuit_t *circ, const uint8_t *request, + size_t request_len); MOCK_DECL(int, hs_intro_send_intro_established_cell,(or_circuit_t *circ)); @@ -33,8 +43,8 @@ verify_establish_intro_cell(const hs_cell_establish_intro_t *out, size_t circuit_key_material_len); STATIC void -get_auth_key_from_establish_intro_cell(ed25519_public_key_t *auth_key_out, - const hs_cell_establish_intro_t *cell); +get_auth_key_from_cell(ed25519_public_key_t *auth_key_out, + unsigned int cell_type, const void *cell); #endif /* HS_INTROPOINT_PRIVATE */ |