From e1497744c8887c883541d3cb6d3d63d9ab51f9ad Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 10 Nov 2016 16:04:23 -0500 Subject: prop224: Add INTRODUCE1 cell relay support Closes #20029 Signed-off-by: David Goulet --- src/or/hs_intropoint.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/or/hs_intropoint.h') 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 */ -- cgit v1.2.3-54-g00ecf