diff options
author | George Kadianakis <desnacked@riseup.net> | 2020-03-30 16:33:30 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-04-13 14:13:33 -0400 |
commit | f2f718bca504d0fe1cce566185f8c17e23862335 (patch) | |
tree | 00db8a640202b5e0ae981cf31081f9639c8caff2 /src/test/test_hs_client.c | |
parent | 37bcc9f3d2f2df0335a42c9692e7d5deafc03514 (diff) | |
download | tor-f2f718bca504d0fe1cce566185f8c17e23862335.tar.gz tor-f2f718bca504d0fe1cce566185f8c17e23862335.zip |
hs-v3: Change all-zeroes hard-assert to a BUG-and-err.
And also disallow all-zeroes keys from the filesystem; add a test for it too.
Diffstat (limited to 'src/test/test_hs_client.c')
-rw-r--r-- | src/test/test_hs_client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c index 5f7fe9c404..4d938e4637 100644 --- a/src/test/test_hs_client.c +++ b/src/test/test_hs_client.c @@ -732,6 +732,10 @@ test_parse_auth_file_content(void *arg) /* Bigger key than it should be */ tt_assert(!parse_auth_file_content("xx:descriptor:x25519:" "vjqea4jbhwwc4hto7ekyvqfbeodghbaq6nxi45hz4wr3qvhqv3yqa")); + /* All-zeroes key */ + tt_assert(!parse_auth_file_content("xx:descriptor:x25519:" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); + done: tor_free(auth); } |