diff options
author | David Goulet <dgoulet@torproject.org> | 2019-05-09 13:09:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-05-20 08:56:34 -0400 |
commit | 79cfe2ddd7c030e679104588c7e4842c2ff6b239 (patch) | |
tree | 635dab2eaef37486ed4967aa12010adc3e665321 /src/trunnel/hs/cell_introduce1.trunnel | |
parent | dcc1d8d15bf11ca1c4e2760bbc47d5fa3df3814d (diff) | |
download | tor-79cfe2ddd7c030e679104588c7e4842c2ff6b239.tar.gz tor-79cfe2ddd7c030e679104588c7e4842c2ff6b239.zip |
hs: Remove hs_intro_auth_key_type_t enum
Like the previous commit about the INTRODUCE_ACK status code, change all auth
key type to use the one defined in the trunnel file.
Standardize the use of these auth type to a common ABI.
Part of #30454
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/trunnel/hs/cell_introduce1.trunnel')
-rw-r--r-- | src/trunnel/hs/cell_introduce1.trunnel | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/trunnel/hs/cell_introduce1.trunnel b/src/trunnel/hs/cell_introduce1.trunnel index 6d924058f9..69da2c1136 100644 --- a/src/trunnel/hs/cell_introduce1.trunnel +++ b/src/trunnel/hs/cell_introduce1.trunnel @@ -17,13 +17,20 @@ const TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS = 0x0000; const TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID = 0x0001; const TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT = 0x0002; +/* Authentication key type. */ +const TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY0 = 0x00; +const TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY1 = 0x01; +const TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519 = 0x02; + /* INTRODUCE1 payload. See details in section 3.2.1. */ struct trn_cell_introduce1 { /* Always zeroed. MUST be checked explicitly by the caller. */ u8 legacy_key_id[TRUNNEL_SHA1_LEN]; /* Authentication key material. */ - u8 auth_key_type IN [0x00, 0x01, 0x02]; + u8 auth_key_type IN [TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY0, + TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY1, + TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519]; u16 auth_key_len; u8 auth_key[auth_key_len]; |