diff options
author | David Goulet <dgoulet@torproject.org> | 2019-05-28 12:35:04 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2019-10-17 11:31:03 -0400 |
commit | 52bf54ecd4aa48a95f16c2e678ede7d24ef4d322 (patch) | |
tree | b86c1e73d08be40064d10bcdf7a1186210083d92 /src/feature/hs/hs_descriptor.h | |
parent | 8e0d9189c5e0331d713ec5d5ef3593e2fb0e11d7 (diff) | |
download | tor-52bf54ecd4aa48a95f16c2e678ede7d24ef4d322.tar.gz tor-52bf54ecd4aa48a95f16c2e678ede7d24ef4d322.zip |
hs-v3: Add a series of decoding error code
This commit introduces the hs_desc_decode_status_t enum which aims at having
more fine grained error code when decoding a descriptor.
This will be useful in later commits when we support keeping a descriptor that
can't be decrypted due to missing or bad client authorization creds.
No behavior change.
Part of #30382.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_descriptor.h')
-rw-r--r-- | src/feature/hs/hs_descriptor.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/feature/hs/hs_descriptor.h b/src/feature/hs/hs_descriptor.h index 731e0c5ce9..8d9dac1747 100644 --- a/src/feature/hs/hs_descriptor.h +++ b/src/feature/hs/hs_descriptor.h @@ -69,6 +69,15 @@ typedef enum { HS_DESC_AUTH_ED25519 = 1 } hs_desc_auth_type_t; +/** Error code when decoding a descriptor. */ +typedef enum { + HS_DESC_DECODE_ENCRYPTED_ERROR = -4, + HS_DESC_DECODE_SUPERENC_ERROR = -3, + HS_DESC_DECODE_PLAINTEXT_ERROR = -2, + HS_DESC_DECODE_GENERIC_ERROR = -1, + HS_DESC_DECODE_OK = 0, +} hs_desc_decode_status_t; + /** Introduction point information located in a descriptor. */ typedef struct hs_desc_intro_point_t { /** Link specifier(s) which details how to extend to the relay. This list |