diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-16 18:27:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-21 10:31:29 -0500 |
commit | 4532c7ef6aa96d502412cbc61da91369bc3eaa44 (patch) | |
tree | aef8b0cd5b94a5ab7d7967e9d3f90f963b5d737d /src/feature/hs/hs_descriptor.h | |
parent | 3484608bda4d8c329ad886ddf98087d775c43a72 (diff) | |
download | tor-4532c7ef6aa96d502412cbc61da91369bc3eaa44.tar.gz tor-4532c7ef6aa96d502412cbc61da91369bc3eaa44.zip |
Turn hs_subcredential_t into a proper struct.
Diffstat (limited to 'src/feature/hs/hs_descriptor.h')
-rw-r--r-- | src/feature/hs/hs_descriptor.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/feature/hs/hs_descriptor.h b/src/feature/hs/hs_descriptor.h index 639dd31c8f..08daa904b6 100644 --- a/src/feature/hs/hs_descriptor.h +++ b/src/feature/hs/hs_descriptor.h @@ -14,6 +14,7 @@ #include "core/or/or.h" #include "trunnel/ed25519_cert.h" /* needed for trunnel */ #include "feature/nodelist/torcert.h" +#include "core/crypto/hs_ntor.h" /* for hs_subcredential_t */ /* Trunnel */ struct link_specifier_t; @@ -238,7 +239,7 @@ typedef struct hs_descriptor_t { /** Subcredentials of a service, used by the client and service to decrypt * the encrypted data. */ - uint8_t subcredential[DIGEST256_LEN]; + hs_subcredential_t subcredential; } hs_descriptor_t; /** Return true iff the given descriptor format version is supported. */ @@ -277,7 +278,7 @@ MOCK_DECL(int, char **encoded_out)); int hs_desc_decode_descriptor(const char *encoded, - const uint8_t *subcredential, + const hs_subcredential_t *subcredential, const curve25519_secret_key_t *client_auth_sk, hs_descriptor_t **desc_out); int hs_desc_decode_plaintext(const char *encoded, @@ -302,7 +303,7 @@ void hs_desc_authorized_client_free_(hs_desc_authorized_client_t *client); hs_desc_authorized_client_t *hs_desc_build_fake_authorized_client(void); -void hs_desc_build_authorized_client(const uint8_t *subcredential, +void hs_desc_build_authorized_client(const hs_subcredential_t *subcredential, const curve25519_public_key_t * client_auth_pk, const curve25519_secret_key_t * |