summaryrefslogtreecommitdiff
path: root/src/or/hs_descriptor.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-08-03 12:01:52 +0300
committerNick Mathewson <nickm@torproject.org>2017-08-08 20:29:34 -0400
commit1397ac11d69b9a48ef5f17485ac1fd5e3ada922e (patch)
tree513bd7b634a25c4fa8f8129cad6254f17f36f0f3 /src/or/hs_descriptor.c
parent708789025da9369f45ff18a6bcf743f005d9abff (diff)
downloadtor-1397ac11d69b9a48ef5f17485ac1fd5e3ada922e.tar.gz
tor-1397ac11d69b9a48ef5f17485ac1fd5e3ada922e.zip
Use htonll() when INT_8 is used.
Also prepend period_length to any period_num, as specified by the spec.
Diffstat (limited to 'src/or/hs_descriptor.c')
-rw-r--r--src/or/hs_descriptor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c
index 6f304d6d2d..e18e25b26c 100644
--- a/src/or/hs_descriptor.c
+++ b/src/or/hs_descriptor.c
@@ -236,7 +236,7 @@ build_secret_input(const hs_descriptor_t *desc, uint8_t *dst, size_t dstlen)
memcpy(dst + offset, desc->subcredential, sizeof(desc->subcredential));
offset += sizeof(desc->subcredential);
/* Copy revision counter value. */
- set_uint64(dst + offset, tor_ntohll(desc->plaintext_data.revision_counter));
+ set_uint64(dst + offset, tor_htonll(desc->plaintext_data.revision_counter));
offset += sizeof(uint64_t);
tor_assert(HS_DESC_ENCRYPTED_SECRET_INPUT_LEN == offset);
}