aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_descriptor.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-05-28 13:00:57 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2019-11-18 19:06:43 +0200
commit96a53221b08436d1fa97e3024f46039591f988c7 (patch)
treef4e79db3cd6a5a672a5d953a8de5db9c3457f179 /src/feature/hs/hs_descriptor.h
parent52bf54ecd4aa48a95f16c2e678ede7d24ef4d322 (diff)
downloadtor-96a53221b08436d1fa97e3024f46039591f988c7.tar.gz
tor-96a53221b08436d1fa97e3024f46039591f988c7.zip
hs-v3: Keep descriptor in cache if client auth is missing or bad
We now keep the descriptor in the cache, obviously not decoded, if it can't be decrypted for which we believe client authorization is missing or unusable (bad). This way, it can be used later once the client authorization are added or updated. 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.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/feature/hs/hs_descriptor.h b/src/feature/hs/hs_descriptor.h
index 8d9dac1747..4f726f8c97 100644
--- a/src/feature/hs/hs_descriptor.h
+++ b/src/feature/hs/hs_descriptor.h
@@ -71,11 +71,27 @@ typedef enum {
/** 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,
+ /* The configured client authorization for the requested .onion address
+ * failed to decode the descriptor. */
+ HS_DESC_DECODE_BAD_CLIENT_AUTH = -6,
+
+ /* The requested .onion address requires a client authorization. */
+ HS_DESC_DECODE_NEED_CLIENT_AUTH = -5,
+
+ /* Error during decryption of the encrypted layer. */
+ HS_DESC_DECODE_ENCRYPTED_ERROR = -4,
+
+ /* Error during decryption of the super encrypted layer. */
+ HS_DESC_DECODE_SUPERENC_ERROR = -3,
+
+ /* Error while decoding the plaintext section. */
+ HS_DESC_DECODE_PLAINTEXT_ERROR = -2,
+
+ /* Generic error. */
+ HS_DESC_DECODE_GENERIC_ERROR = -1,
+
+ /* Decoding a descriptor was successful. */
+ HS_DESC_DECODE_OK = 0,
} hs_desc_decode_status_t;
/** Introduction point information located in a descriptor. */