summaryrefslogtreecommitdiff
path: root/src/or/hs_descriptor.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-10-27 14:28:02 -0400
committerNick Mathewson <nickm@torproject.org>2017-10-27 14:28:02 -0400
commit26e0909e516a91281c2ad1fcac23405f3cc1ee11 (patch)
treed32ae53346980a28f705d63422027cf5cb330db0 /src/or/hs_descriptor.h
parentd5eea977be405b984e651564736179df4b27b31c (diff)
downloadtor-26e0909e516a91281c2ad1fcac23405f3cc1ee11.tar.gz
tor-26e0909e516a91281c2ad1fcac23405f3cc1ee11.zip
In the hsdescv3 fuzzer, replace the decryption function.
The new decryption function performs no decryption, skips the salt, and doesn't check the mac. This allows us to fuzz the hs_descriptor.c code using unencrypted descriptor test, and exercise more of the code. Related to 21509.
Diffstat (limited to 'src/or/hs_descriptor.h')
-rw-r--r--src/or/hs_descriptor.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h
index 971e856647..7730ce09f0 100644
--- a/src/or/hs_descriptor.h
+++ b/src/or/hs_descriptor.h
@@ -261,6 +261,13 @@ STATIC size_t decode_superencrypted(const char *message, size_t message_len,
uint8_t **encrypted_out);
STATIC void desc_plaintext_data_free_contents(hs_desc_plaintext_data_t *desc);
+MOCK_DECL(STATIC size_t, decrypt_desc_layer,(const hs_descriptor_t *desc,
+ const uint8_t *encrypted_blob,
+ size_t encrypted_blob_size,
+ int is_superencrypted_layer,
+ char **decrypted_out));
+
+
#endif /* defined(HS_DESCRIPTOR_PRIVATE) */
#endif /* !defined(TOR_HS_DESCRIPTOR_H) */