From f2f718bca504d0fe1cce566185f8c17e23862335 Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Mon, 30 Mar 2020 16:33:30 +0300 Subject: 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. --- src/test/test_hs_client.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/test/test_hs_client.c') 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); } -- cgit v1.2.3-54-g00ecf