diff options
Diffstat (limited to 'src/or/hs_descriptor.h')
-rw-r--r-- | src/or/hs_descriptor.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h index 7ee686118e..9b48096d0e 100644 --- a/src/or/hs_descriptor.h +++ b/src/or/hs_descriptor.h @@ -207,4 +207,29 @@ int hs_desc_decode_plaintext(const char *encoded, int hs_desc_decode_encrypted(const hs_descriptor_t *desc, hs_desc_encrypted_data_t *desc_out); +#ifdef HS_DESCRIPTOR_PRIVATE + +/* Encoding. */ +STATIC int encode_cert(const tor_cert_t *cert, char **cert_str_out); +STATIC char *encode_link_specifiers(const smartlist_t *specs); +STATIC size_t build_plaintext_padding(const char *plaintext, + size_t plaintext_len, + uint8_t **padded_out); +/* Decoding. */ +STATIC smartlist_t *decode_link_specifiers(const char *encoded); +STATIC hs_desc_intro_point_t *decode_introduction_point( + const hs_descriptor_t *desc, + const char *text); +STATIC int decode_intro_points(const hs_descriptor_t *desc, + hs_desc_encrypted_data_t *desc_enc, + const char *data); +STATIC int encrypted_data_length_is_valid(size_t len); +STATIC int cert_is_valid(tor_cert_t *cert, uint8_t type, + const char *log_obj_type); +STATIC int desc_sig_is_valid(const char *b64_sig, + const ed25519_keypair_t *signing_kp, + const char *encoded_desc, size_t encoded_len); + +#endif /* HS_DESCRIPTOR_PRIVATE */ + #endif /* TOR_HS_DESCRIPTOR_H */ |