diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-02-02 08:40:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-02-02 08:40:05 -0500 |
commit | fc3e742b5b804c9ab12c6bd878551b03dfc24ba9 (patch) | |
tree | 47a78dd34eb13711d82f6940db0529c31190b5e4 /src | |
parent | 2d2ab29ce89d85f64f4bf4802d6b1e22a74a9ad9 (diff) | |
parent | 7eb7af08d942766cb8b96d2460f0b2946cf4403c (diff) | |
download | tor-fc3e742b5b804c9ab12c6bd878551b03dfc24ba9.tar.gz tor-fc3e742b5b804c9ab12c6bd878551b03dfc24ba9.zip |
Merge remote-tracking branch 'ahf/ahf/bugs/21266'
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_hs_intropoint.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c index 770fff42d2..ea12aeb2da 100644 --- a/src/test/test_hs_intropoint.c +++ b/src/test/test_hs_intropoint.c @@ -146,8 +146,11 @@ test_establish_intro_wrong_purpose(void *arg) establish_intro_cell); tt_int_op(cell_len, >, 0); - /* Receive the cell */ + /* Receive the cell. Should fail. */ + setup_full_capture_of_logs(LOG_INFO); retval = hs_intro_received_establish_intro(intro_circ, cell_body, cell_len); + expect_log_msg_containing("Rejecting ESTABLISH_INTRO on non-OR circuit."); + teardown_capture_of_logs(); tt_int_op(retval, ==, -1); done: @@ -180,7 +183,10 @@ test_establish_intro_wrong_keytype(void *arg) helper_prepare_circ_for_intro(intro_circ, circuit_key_material); /* Receive the cell. Should fail. */ + setup_full_capture_of_logs(LOG_INFO); retval = hs_intro_received_establish_intro(intro_circ, (uint8_t*)"", 0); + expect_log_msg_containing("Empty ESTABLISH_INTRO cell."); + teardown_capture_of_logs(); tt_int_op(retval, ==, -1); done: @@ -217,7 +223,10 @@ test_establish_intro_wrong_keytype2(void *arg) cell_body[0] = 42; /* Receive the cell. Should fail. */ + setup_full_capture_of_logs(LOG_INFO); retval = hs_intro_received_establish_intro(intro_circ, cell_body, cell_len); + expect_log_msg_containing("Unrecognized AUTH_KEY_TYPE 42."); + teardown_capture_of_logs(); tt_int_op(retval, ==, -1); done: @@ -413,7 +422,10 @@ test_establish_intro_wrong_sig(void *arg) cell_body[cell_len-1]++; /* Receive the cell. Should fail. */ + setup_full_capture_of_logs(LOG_INFO); retval = hs_intro_received_establish_intro(intro_circ, cell_body, cell_len); + expect_log_msg_containing("Failed to verify ESTABLISH_INTRO cell."); + teardown_capture_of_logs(); tt_int_op(retval, ==, -1); done: |