diff options
author | Micah Elizabeth Scott <beth@torproject.org> | 2023-03-14 20:45:36 -0700 |
---|---|---|
committer | Micah Elizabeth Scott <beth@torproject.org> | 2023-05-10 07:38:28 -0700 |
commit | 00d9e0d252687110189ea5a1ed0dce99a7984681 (patch) | |
tree | d1c936037c98231b423ebdfd010a95376dabb63a /src/test/test_hs_pow.c | |
parent | 209a59face791159e167837214e22b6eaa3375b4 (diff) | |
download | tor-00d9e0d252687110189ea5a1ed0dce99a7984681.tar.gz tor-00d9e0d252687110189ea5a1ed0dce99a7984681.zip |
hs_pow: Define seed_head as uint8_t[4] instead of uint32_t
This is more consistent with the specification, and it's much
less confusing with endianness. This resolves the underlying
cause of the earlier byte-swap. This patch itself does not
change the wire protocol at all, it's just tidying up the
types we use at the trunnel layer.
Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/test/test_hs_pow.c')
-rw-r--r-- | src/test/test_hs_pow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_hs_pow.c b/src/test/test_hs_pow.c index e2111478fc..877f022a79 100644 --- a/src/test/test_hs_pow.c +++ b/src/test/test_hs_pow.c @@ -382,7 +382,7 @@ test_hs_pow_vectors(void *arg) sol_hex, 2 * sizeof solution.equix_solution), OP_EQ, HS_POW_EQX_SOL_LEN); - solution.seed_head = tor_ntohl(get_uint32(pow_state->seed_previous)); + memcpy(solution.seed_head, pow_state->seed_previous, HS_POW_SEED_HEAD_LEN); /* Try to encode 'solution' into a relay cell */ |