Commit 53dd1699 authored by haxxpop's avatar haxxpop Committed by David Goulet
Browse files

hs-v3: Re-enable the decoding in the encoding function



Previously, the validation by decoding a created descriptor was disabled
because the interface had to be entirely changed and not implemented at the
time.

This commit re-enabled it because it is now implemented.
Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent 69fb25b0
......@@ -2705,14 +2705,16 @@ hs_desc_encode_descriptor,(const hs_descriptor_t *desc,
goto err;
}
/* Try to decode what we just encoded. Symmetry is nice! */
/* XXX: I need to disable this assertation for now to make the test pass.
* I will enable it again when I finish writing the decoding */
/* ret = hs_desc_decode_descriptor(*encoded_out, */
/* desc->subcredential, NULL); */
/* if (BUG(ret < 0)) { */
/* goto err; */
/* } */
/* Try to decode what we just encoded. Symmetry is nice!, but it is
* symmetric only if the client auth is disabled. That is, the descriptor
* cookie will be NULL. */
if (!descriptor_cookie) {
ret = hs_desc_decode_descriptor(*encoded_out, desc->subcredential,
NULL, NULL);
if (BUG(ret < 0)) {
goto err;
}
}
return 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment