diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-08-17 23:13:15 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2017-08-21 19:16:45 +0300 |
commit | 1491c0d024130a5699ae9acbeb2263d9d6ca2c3c (patch) | |
tree | ab30ca177cb6baa196ee08e01f53e1d849026269 /src/test/test_hs_descriptor.c | |
parent | 45732a1a13cb05107f5822afed0c01388096be27 (diff) | |
download | tor-1491c0d024130a5699ae9acbeb2263d9d6ca2c3c.tar.gz tor-1491c0d024130a5699ae9acbeb2263d9d6ca2c3c.zip |
Fix triggerable BUG() when decoding hsv3 descriptors.
Also improve the unittest to make sure it catches the right error.
Diffstat (limited to 'src/test/test_hs_descriptor.c')
-rw-r--r-- | src/test/test_hs_descriptor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c index 5be0747085..b68bd108fa 100644 --- a/src/test/test_hs_descriptor.c +++ b/src/test/test_hs_descriptor.c @@ -569,8 +569,12 @@ test_decode_bad_signature(void *arg) /* Update approx time to dodge cert expiration */ update_approx_time(1502661599); + + setup_full_capture_of_logs(LOG_WARN); ret = hs_desc_decode_plaintext(HS_DESC_BAD_SIG, &desc_plaintext); tt_int_op(ret, OP_EQ, -1); + expect_log_msg_containing("Malformed signature line. Rejecting."); + teardown_capture_of_logs(); done: ; } |